|
@ -435,6 +435,7 @@ class FormatsTab(TabPanel): |
|
|
|
|
|
|
|
|
self.post_proc_opts_label = self.crt_statictext("Post-Process options") |
|
|
self.post_proc_opts_label = self.crt_statictext("Post-Process options") |
|
|
self.keep_video_checkbox = self.crt_checkbox("Keep original video") |
|
|
self.keep_video_checkbox = self.crt_checkbox("Keep original video") |
|
|
|
|
|
self.extract_audio_checkbox = self.crt_checkbox("Extract audio from video file") |
|
|
|
|
|
|
|
|
self.audio_quality_label = self.crt_statictext("Audio quality") |
|
|
self.audio_quality_label = self.crt_statictext("Audio quality") |
|
|
self.audio_quality_combobox = self.crt_combobox(list(self.AUDIO_QUALITY.values())) |
|
|
self.audio_quality_combobox = self.crt_combobox(list(self.AUDIO_QUALITY.values())) |
|
@ -452,7 +453,8 @@ class FormatsTab(TabPanel): |
|
|
vertical_sizer.Add(self.audio_formats_checklistbox, 1, wx.EXPAND | wx.ALL, border=5) |
|
|
vertical_sizer.Add(self.audio_formats_checklistbox, 1, wx.EXPAND | wx.ALL, border=5) |
|
|
|
|
|
|
|
|
vertical_sizer.Add(self.post_proc_opts_label) |
|
|
vertical_sizer.Add(self.post_proc_opts_label) |
|
|
vertical_sizer.Add(self.keep_video_checkbox, flag=wx.ALL, border=5) |
|
|
|
|
|
|
|
|
vertical_sizer.Add(self.keep_video_checkbox, flag=wx.LEFT | wx.RIGHT | wx.TOP, border=5) |
|
|
|
|
|
vertical_sizer.Add(self.extract_audio_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5) |
|
|
|
|
|
|
|
|
audio_quality_sizer = wx.BoxSizer(wx.HORIZONTAL) |
|
|
audio_quality_sizer = wx.BoxSizer(wx.HORIZONTAL) |
|
|
audio_quality_sizer.Add(self.audio_quality_label, flag=wx.ALIGN_CENTER_VERTICAL) |
|
|
audio_quality_sizer.Add(self.audio_quality_label, flag=wx.ALIGN_CENTER_VERTICAL) |
|
@ -471,6 +473,7 @@ class FormatsTab(TabPanel): |
|
|
self.audio_formats_checklistbox.SetCheckedStrings(checked_audio_formats) |
|
|
self.audio_formats_checklistbox.SetCheckedStrings(checked_audio_formats) |
|
|
self.keep_video_checkbox.SetValue(self.opt_manager.options["keep_video"]) |
|
|
self.keep_video_checkbox.SetValue(self.opt_manager.options["keep_video"]) |
|
|
self.audio_quality_combobox.SetValue(self.AUDIO_QUALITY[self.opt_manager.options["audio_quality"]]) |
|
|
self.audio_quality_combobox.SetValue(self.AUDIO_QUALITY[self.opt_manager.options["audio_quality"]]) |
|
|
|
|
|
self.extract_audio_checkbox.SetValue(self.opt_manager.options["to_audio"]) |
|
|
|
|
|
|
|
|
def save_options(self): |
|
|
def save_options(self): |
|
|
checked_video_formats = [VIDEO_FORMATS[vformat] for vformat in self.video_formats_checklistbox.GetCheckedStrings()] |
|
|
checked_video_formats = [VIDEO_FORMATS[vformat] for vformat in self.video_formats_checklistbox.GetCheckedStrings()] |
|
@ -479,6 +482,7 @@ class FormatsTab(TabPanel): |
|
|
self.opt_manager.options["selected_audio_formats"] = checked_audio_formats |
|
|
self.opt_manager.options["selected_audio_formats"] = checked_audio_formats |
|
|
self.opt_manager.options["keep_video"] = self.keep_video_checkbox.GetValue() |
|
|
self.opt_manager.options["keep_video"] = self.keep_video_checkbox.GetValue() |
|
|
self.opt_manager.options["audio_quality"] = self.AUDIO_QUALITY[self.audio_quality_combobox.GetValue()] |
|
|
self.opt_manager.options["audio_quality"] = self.AUDIO_QUALITY[self.audio_quality_combobox.GetValue()] |
|
|
|
|
|
self.opt_manager.options["to_audio"] = self.extract_audio_checkbox.GetValue() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DownloadsTab(TabPanel): |
|
|
class DownloadsTab(TabPanel): |
|
|