Browse Source

Add youtube-dl '--ignore-config' option under Extra tab

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

1
TODO

@ -38,7 +38,6 @@ Options
* Add Swedish on available subtitles
* Add Hebrew on available subtitles
* Localization option: add country flags
* Add '--ignore-config' flag to extra options
* Add '--recode-video' to Formats tab
Other

6
youtube_dl_gui/optionsframe.py

@ -816,8 +816,10 @@ class ExtraTab(TabPanel):
self.cmdline_args_textctrl = self.crt_textctrl(wx.TE_MULTILINE | wx.TE_LINEWRAP)
self.extra_opts_label = self.crt_statictext("Extra options")
self.ignore_errors_checkbox = self.crt_checkbox("Ignore errors")
self.youtube_dl_debug_checkbox = self.crt_checkbox("Debug youtube-dl")
self.ignore_config_checkbox = self.crt_checkbox("Ignore youtube-dl config")
self._set_layout()
@ -833,6 +835,8 @@ class ExtraTab(TabPanel):
extra_opts_sizer = wx.WrapSizer()
extra_opts_sizer.Add(self.ignore_errors_checkbox)
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.youtube_dl_debug_checkbox)
vertical_sizer.Add(extra_opts_sizer, flag=wx.ALL, border=5)
@ -844,11 +848,13 @@ class ExtraTab(TabPanel):
self.cmdline_args_textctrl.SetValue(self.opt_manager.options["cmd_args"])
self.ignore_errors_checkbox.SetValue(self.opt_manager.options["ignore_errors"])
self.youtube_dl_debug_checkbox.SetValue(self.opt_manager.options["youtube_dl_debug"])
self.ignore_config_checkbox.SetValue(self.opt_manager.options["ignore_config"])
def save_options(self):
self.opt_manager.options["cmd_args"] = self.cmdline_args_textctrl.GetValue()
self.opt_manager.options["ignore_errors"] = self.ignore_errors_checkbox.GetValue()
self.opt_manager.options["youtube_dl_debug"] = self.youtube_dl_debug_checkbox.GetValue()
self.opt_manager.options["ignore_config"] = self.ignore_config_checkbox.GetValue()
class LogGUI(wx.Frame):

5
youtube_dl_gui/optionsmanager.py

@ -211,6 +211,8 @@ class OptionsManager(object):
youtube_dl_debug (boolean): When True will pass '-v' flag to youtube-dl.
ignore_config (boolean): When True will ignore youtube-dl config file options.
"""
#TODO Remove old options & check options validation
self.options = {
@ -268,7 +270,8 @@ class OptionsManager(object):
'selected_video_formats': ['webm', 'mp4'],
'selected_audio_formats': ['mp3', 'm4a', 'vorbis'],
'selected_format': '0',
'youtube_dl_debug': False
'youtube_dl_debug': False,
'ignore_config': True
}
def load_from_file(self):

3
youtube_dl_gui/parsers.py

@ -101,7 +101,8 @@ class OptionsParser(object):
OptionHolder('video_format', '-f', '0'),
OptionHolder('subs_lang', '--sub-lang', '', ['write_subs']),
OptionHolder('audio_quality', '--audio-quality', '5', ['to_audio']),
OptionHolder('youtube_dl_debug', '-v', False)
OptionHolder('youtube_dl_debug', '-v', False),
OptionHolder('ignore_config', '--ignore-config', False)
]
def parse(self, options_dictionary):

Loading…
Cancel
Save