diff --git a/TODO b/TODO index 137bf7e..014c81d 100644 --- a/TODO +++ b/TODO @@ -8,7 +8,6 @@ NEW_LAYOUT * Swap some of the Error messages with Info * Add clear list button ? * Icons theme selection (vote on github) -* Save freq. used paths to 'settings.json' instead of 'spaths' * Update & re-enable options window GUI diff --git a/youtube_dl_gui/mainframe.py b/youtube_dl_gui/mainframe.py index 8f0b15f..c2efae0 100644 --- a/youtube_dl_gui/mainframe.py +++ b/youtube_dl_gui/mainframe.py @@ -188,9 +188,6 @@ class MainFrame(wx.Frame): # Get the pixmaps directory self._pixmaps_path = get_pixmaps_dir() - # Get stored save paths file - self._stored_paths = os.path.join(get_config_path(), "spaths") - # Get video formats self._video_formats = read_formats() @@ -298,7 +295,7 @@ class MainFrame(wx.Frame): self._status_bar_write(self.WELCOME_MSG) self._videoformat_combobox.SetValue(self._video_formats[self.opt_manager.options["video_format"]]) - self._path_combobox.LoadMultiple(json_load(self._stored_paths)) + self._path_combobox.LoadMultiple(self.opt_manager.options["save_path_dirs"]) self._path_combobox.SetValue(self.opt_manager.options["save_path"]) self._set_layout() @@ -930,11 +927,11 @@ class MainFrame(wx.Frame): self.opt_manager.options['main_win_size'] = self.GetSize() self.opt_manager.options['opts_win_size'] = self._options_frame.GetSize() + self.opt_manager.options["save_path_dirs"] = self._path_combobox.GetStrings() + #self._options_frame.save_all_options() self.opt_manager.save_to_file() - json_store(self._stored_paths, self._path_combobox.GetStrings()) - self.Destroy() diff --git a/youtube_dl_gui/optionsmanager.py b/youtube_dl_gui/optionsmanager.py index 12d1e5c..4fe410d 100644 --- a/youtube_dl_gui/optionsmanager.py +++ b/youtube_dl_gui/optionsmanager.py @@ -198,9 +198,12 @@ class OptionsManager(object): If window becomes to small the program will reset its size. See _settings_are_valid method MIN_FRAME_SIZE. + save_path_dirs (list): List that contains temporary save paths. + """ self.options = { 'save_path': os_path_expanduser('~'), + 'save_path_dirs': [], 'video_format': '0', 'second_video_format': '0', 'to_audio': False,