diff --git a/app/ui/backup.py b/app/ui/backup.py index 8d27143c..3e5dd01f 100644 --- a/app/ui/backup.py +++ b/app/ui/backup.py @@ -113,7 +113,7 @@ class BackupDialog: shutil.unpack_archive(full_file_name, self._data_path) elif restore_type is RestoreType.BOUQUETS: tmp_dir = tempfile.gettempdir() + "/" + file_name - cond = (".tv", ".radio") if self._profile is Profile.ENIGMA_2 else "bouquets.xml" + cond = (".tv", ".radio") if self._profile is Profile.ENIGMA_2 else ("bouquets.xml", "bouquets.xml") shutil.unpack_archive(full_file_name, tmp_dir) for file in filter(lambda f: f.endswith(cond), os.listdir(self._data_path)): os.remove(os.path.join(self._data_path, file)) diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 11fd23d1..295032c5 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -871,6 +871,10 @@ class Application(Gtk.Application): @run_idle def on_data_save(self, *args): + if len(self._bouquets_model) == 0: + show_dialog(DialogType.ERROR, self._main_window, "No data to save!") + return + if show_dialog(DialogType.QUESTION, self._main_window) == Gtk.ResponseType.CANCEL: return