Browse Source

Add 'No mtime' option, closes #127

doc-issue-template
MrS0m30n3 8 years ago
parent
commit
a651e51667
3 changed files with 12 additions and 2 deletions
  1. 5
      youtube_dl_gui/optionsframe.py
  2. 6
      youtube_dl_gui/optionsmanager.py
  3. 3
      youtube_dl_gui/parsers.py

5
youtube_dl_gui/optionsframe.py

@ -857,6 +857,7 @@ class ExtraTab(TabPanel):
self.youtube_dl_debug_checkbox = self.crt_checkbox("Debug youtube-dl")
self.ignore_errors_checkbox = self.crt_checkbox("Ignore errors")
self.ignore_config_checkbox = self.crt_checkbox("Ignore youtube-dl config")
self.no_mtime_checkbox = self.crt_checkbox("No mtime")
self.native_hls_checkbox = self.crt_checkbox("Prefer native HLS")
self._set_layout()
@ -877,6 +878,8 @@ class ExtraTab(TabPanel):
extra_opts_sizer.AddSpacer((5, -1))
extra_opts_sizer.Add(self.ignore_config_checkbox)
extra_opts_sizer.AddSpacer((5, -1))
extra_opts_sizer.Add(self.no_mtime_checkbox)
extra_opts_sizer.AddSpacer((5, -1))
extra_opts_sizer.Add(self.native_hls_checkbox)
vertical_sizer.Add(extra_opts_sizer, flag=wx.ALL, border=5)
@ -890,6 +893,7 @@ class ExtraTab(TabPanel):
self.youtube_dl_debug_checkbox.SetValue(self.opt_manager.options["youtube_dl_debug"])
self.ignore_config_checkbox.SetValue(self.opt_manager.options["ignore_config"])
self.native_hls_checkbox.SetValue(self.opt_manager.options["native_hls"])
self.no_mtime_checkbox.SetValue(self.opt_manager.options["nomtime"])
def save_options(self):
self.opt_manager.options["cmd_args"] = self.cmdline_args_textctrl.GetValue()
@ -897,6 +901,7 @@ class ExtraTab(TabPanel):
self.opt_manager.options["youtube_dl_debug"] = self.youtube_dl_debug_checkbox.GetValue()
self.opt_manager.options["ignore_config"] = self.ignore_config_checkbox.GetValue()
self.opt_manager.options["native_hls"] = self.native_hls_checkbox.GetValue()
self.opt_manager.options["nomtime"] = self.no_mtime_checkbox.GetValue()
class LogGUI(wx.Frame):

6
youtube_dl_gui/optionsmanager.py

@ -222,6 +222,9 @@ class OptionsManager(object):
confirm_deletion (boolean): When True ask user before item removal.
nomtime (boolean): When True will not use the Last-modified header to
set the file modification time.
"""
#TODO Remove old options & check options validation
self.options = {
@ -284,7 +287,8 @@ class OptionsManager(object):
'confirm_exit': True,
'native_hls': True,
'show_completion_popup': True,
'confirm_deletion': True
'confirm_deletion': True,
'nomtime': False
}
def load_from_file(self):

3
youtube_dl_gui/parsers.py

@ -103,7 +103,8 @@ class OptionsParser(object):
OptionHolder('audio_quality', '--audio-quality', '5', ['to_audio']),
OptionHolder('youtube_dl_debug', '-v', False),
OptionHolder('ignore_config', '--ignore-config', False),
OptionHolder('native_hls', '--hls-prefer-native', False)
OptionHolder('native_hls', '--hls-prefer-native', False),
OptionHolder('nomtime', '--no-mtime', False)
]
def parse(self, options_dictionary):

Loading…
Cancel
Save