Browse Source

Add '--hls-prefer-native' option under Extra tab

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

1
TODO

@ -34,7 +34,6 @@ Options
* Option to disable-enable the 'download finished' pop up message
* Option to enable-disable items deletion from the filesystem
* Option to validate item deletion 'Are you sure?'
* Add 'native hls option' see issue #49
* Localization option: add country flags
* Add '--recode-video' to Formats tab

5
youtube_dl_gui/optionsframe.py

@ -821,6 +821,7 @@ class ExtraTab(TabPanel):
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.native_hls_checkbox = self.crt_checkbox("Prefer native HLS")
self._set_layout()
@ -839,6 +840,8 @@ class ExtraTab(TabPanel):
extra_opts_sizer.Add(self.ignore_config_checkbox)
extra_opts_sizer.AddSpacer((5, -1))
extra_opts_sizer.Add(self.youtube_dl_debug_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)
@ -850,12 +853,14 @@ class ExtraTab(TabPanel):
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"])
self.native_hls_checkbox.SetValue(self.opt_manager.options["native_hls"])
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()
self.opt_manager.options["native_hls"] = self.native_hls_checkbox.GetValue()
class LogGUI(wx.Frame):

5
youtube_dl_gui/optionsmanager.py

@ -215,6 +215,8 @@ class OptionsManager(object):
confirm_exit (boolean): When True create popup to confirm exiting youtube-dl-gui.
native_hls (boolean): When True youtube-dl will use the native HLS implementation.
"""
#TODO Remove old options & check options validation
self.options = {
@ -274,7 +276,8 @@ class OptionsManager(object):
'selected_format': '0',
'youtube_dl_debug': False,
'ignore_config': True,
'confirm_exit': True
'confirm_exit': True,
'native_hls': True
}
def load_from_file(self):

3
youtube_dl_gui/parsers.py

@ -102,7 +102,8 @@ class OptionsParser(object):
OptionHolder('subs_lang', '--sub-lang', '', ['write_subs']),
OptionHolder('audio_quality', '--audio-quality', '5', ['to_audio']),
OptionHolder('youtube_dl_debug', '-v', False),
OptionHolder('ignore_config', '--ignore-config', False)
OptionHolder('ignore_config', '--ignore-config', False),
OptionHolder('native_hls', '--hls-prefer-native', False)
]
def parse(self, options_dictionary):

Loading…
Cancel
Save