|
|
@ -50,8 +50,8 @@ from .utils import ( |
|
|
|
) |
|
|
|
|
|
|
|
from .formats import ( |
|
|
|
DEFAULT_VIDEO_FORMATS, |
|
|
|
VIDEO_FORMATS |
|
|
|
DEFAULT_FORMATS, |
|
|
|
FORMATS |
|
|
|
) |
|
|
|
|
|
|
|
from .info import ( |
|
|
@ -265,7 +265,7 @@ class MainFrame(wx.Frame): |
|
|
|
self._folder_icon = self._create_static_bitmap(self._bitmaps["folder"]) |
|
|
|
|
|
|
|
self._path_combobox = ExtComboBox(self._panel, 5, style=wx.CB_READONLY) |
|
|
|
self._videoformat_combobox = ExtComboBox(self._panel, choices=list(VIDEO_FORMATS.values()), style=wx.CB_READONLY) |
|
|
|
self._videoformat_combobox = ExtComboBox(self._panel, style=wx.CB_READONLY) |
|
|
|
|
|
|
|
self._download_text = self._create_statictext(self.DOWNLOAD_LIST_LABEL) |
|
|
|
self._status_list = ListCtrl(self.STATUSLIST_COLUMNS, |
|
|
@ -431,18 +431,15 @@ class MainFrame(wx.Frame): |
|
|
|
self._buttons["pause"].SetBitmap(self._bitmaps["pause"], wx.TOP) |
|
|
|
|
|
|
|
def _update_videoformat_combobox(self): |
|
|
|
video_formats = [] |
|
|
|
|
|
|
|
for _, label in DEFAULT_VIDEO_FORMATS: |
|
|
|
video_formats.append(label) |
|
|
|
video_formats = list(DEFAULT_FORMATS.values()) |
|
|
|
|
|
|
|
for vformat in self.opt_manager.options["selected_video_formats"]: |
|
|
|
video_formats.append(VIDEO_FORMATS[vformat]) |
|
|
|
video_formats.append(FORMATS[vformat]) |
|
|
|
|
|
|
|
self._videoformat_combobox.Clear() |
|
|
|
self._videoformat_combobox.AppendItems(video_formats) |
|
|
|
|
|
|
|
current_index = self._videoformat_combobox.FindString(VIDEO_FORMATS[self.opt_manager.options["video_format"]]) |
|
|
|
current_index = self._videoformat_combobox.FindString(FORMATS[self.opt_manager.options["video_format"]]) |
|
|
|
|
|
|
|
if current_index == wx.NOT_FOUND: |
|
|
|
self._videoformat_combobox.SetSelection(0) |
|
|
@ -452,7 +449,7 @@ class MainFrame(wx.Frame): |
|
|
|
self._update_videoformat(None) |
|
|
|
|
|
|
|
def _update_videoformat(self, event): |
|
|
|
self.opt_manager.options["video_format"] = VIDEO_FORMATS[self._videoformat_combobox.GetValue()] |
|
|
|
self.opt_manager.options["video_format"] = FORMATS[self._videoformat_combobox.GetValue()] |
|
|
|
|
|
|
|
def _update_savepath(self, event): |
|
|
|
self.opt_manager.options["save_path"] = self._path_combobox.GetValue() |
|
|
|