diff --git a/app/ui/main.py b/app/ui/main.py index 7ba99222..f1d4cc3b 100644 --- a/app/ui/main.py +++ b/app/ui/main.py @@ -770,7 +770,8 @@ def init_actions(self): self.set_action("on_import_bouquet", self.on_import_bouquet) self.set_action("on_import_bouquets", self.on_import_bouquets) self.set_action("on_new_configuration", self.on_new_configuration) - self.set_action("on_import_from_web", self.on_import_from_web) + sa = self.set_action("on_import_from_web", self.on_import_from_web) + self.bind_property("is-data-save-enabled", sa, "enabled") # Tools. self.set_action("on_backup_tool_show", self.on_backup_tool_show) self.set_state_action("on_telnet_show", self.on_telnet_show, False) @@ -3334,7 +3335,11 @@ def on_import_from_web(self, action, value=None): if self._s_type is not SettingsType.ENIGMA_2: self.show_error_message("Not allowed in this context!") return - ServicesUpdateDialog(self).show() + + if self._page is Page.SATELLITE: + self._satellite_tool.on_update() + else: + ServicesUpdateDialog(self).show() @run_idle def on_import_data_from_web(self, services, bouquets=None): diff --git a/app/ui/xml/dialogs.py b/app/ui/xml/dialogs.py index fa222342..b4506ac2 100644 --- a/app/ui/xml/dialogs.py +++ b/app/ui/xml/dialogs.py @@ -545,6 +545,8 @@ def get_sat_list(self, src, callback): @run_idle def append_satellites(self, sats): model = get_base_model(self._sat_view.get_model()) + if not model: + return for sat in sats: itr = model.append(sat) diff --git a/app/ui/xml/edit.py b/app/ui/xml/edit.py index 9186624c..1cb8fb76 100644 --- a/app/ui/xml/edit.py +++ b/app/ui/xml/edit.py @@ -587,7 +587,7 @@ def on_upload(self, app, page): self._app.upload_data(DownloadType.SATELLITES) @run_idle - def on_update(self, item): + def on_update(self, item=None): SatellitesUpdateDialog(self._app.get_active_window(), self._settings, self._satellite_view.get_model()).show()