diff --git a/TODO b/TODO index 4512789..d1fc720 100644 --- a/TODO +++ b/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 diff --git a/youtube_dl_gui/optionsframe.py b/youtube_dl_gui/optionsframe.py index 6d3fbc3..a95e1c9 100644 --- a/youtube_dl_gui/optionsframe.py +++ b/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): diff --git a/youtube_dl_gui/optionsmanager.py b/youtube_dl_gui/optionsmanager.py index 9f11a56..0030733 100644 --- a/youtube_dl_gui/optionsmanager.py +++ b/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): diff --git a/youtube_dl_gui/parsers.py b/youtube_dl_gui/parsers.py index 37910ea..4aab0ac 100644 --- a/youtube_dl_gui/parsers.py +++ b/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):