diff --git a/app/properties.py b/app/properties.py index eedb24ab..6acb786f 100644 --- a/app/properties.py +++ b/app/properties.py @@ -45,7 +45,7 @@ def get_default_settings(): "services_path": "/etc/enigma2/", "user_bouquet_path": "/etc/enigma2/", "satellites_xml_path": "/etc/tuxbox/", "data_dir_path": DATA_PATH + "enigma2/", "picons_path": "/usr/share/enigma2/picon", "picons_dir_path": DATA_PATH + "enigma2/picons/", - "v5_support": False}, + "v5_support": False, "http_api_support": False}, Profile.NEUTRINO_MP.value: { "host": "127.0.0.1", "port": "21", "user": "root", "password": "root", "http_user": "", "http_password": "", "http_port": "80", "http_timeout": 2, diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index c8acb7ac..75c21d42 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -1380,7 +1380,10 @@ class MainAppWindow: def update_signal(self): sig = self._http_api.send((HttpRequestType.SIGNAL, None)) next(self._http_api) - self._signal_level_bar.set_value(sig.get("snr", 0)) + val = sig.get("snr", 0) + self._signal_level_bar.set_value(val if val else 0) + self._signal_level_bar.set_visible(val) + return self._monitor_signal def update_service_info(self): diff --git a/app/ui/settings_dialog.glade b/app/ui/settings_dialog.glade index f49c84b3..869def98 100644 --- a/app/ui/settings_dialog.glade +++ b/app/ui/settings_dialog.glade @@ -681,125 +681,225 @@ Author: Dmitriy Yefremov 5 5 - + True False - 0.019999999552965164 - in + vertical - + True False - 5 - 5 - 5 - 2 - True + 0.019999999552965164 + in - + True False - Services and Bouquets files: - 0 + 5 + 5 + 5 + 2 + True + + + True + False + Services and Bouquets files: + 0 + + + 0 + 0 + + + + + True + True + /etc/enigma2/ + gtk-edit + + + 0 + 1 + + + + + True + False + User bouquet files: + 2.2351741291171123e-10 + + + 0 + 2 + + + + + True + False + True + /etc/enigma2/ + gtk-edit + + + 0 + 3 + + + + + True + False + Satellites.xml file: + 0.019999999552965164 + + + 0 + 4 + + + + + True + True + /etc/tuxbox/ + gtk-edit + + + 0 + 5 + + + + + True + False + Picons: + 2.2351741291171123e-10 + + + 0 + 6 + + + + + True + True + /usr/share/enigma2/picon + gtk-edit + + + 0 + 7 + + - - 0 - 0 - - - - True - True - /etc/enigma2/ - gtk-edit - - - 0 - 1 - - - - + + True False - User bouquet files: - 2.2351741291171123e-10 + STB file paths: - - 0 - 2 - - - - - True - False - True - /etc/enigma2/ - gtk-edit - - - 0 - 3 - - - - - True - False - Satellites.xml file: - 0.019999999552965164 - - - 0 - 4 - - - - - True - True - /etc/tuxbox/ - gtk-edit - - - 0 - 5 - - - - - True - False - Picons: - 2.2351741291171123e-10 - - - 0 - 6 - - - - - True - True - /usr/share/enigma2/picon - gtk-edit - - - 0 - 7 - + + False + True + 0 + - - + + True False - STB file paths: + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + 2 + True + + + True + False + Picons path: + 0.019999999552965164 + + + 0 + 2 + + + + + True + True + /data/picons + gtk-edit + folder-open-symbolic + + + + 0 + 3 + + + + + True + False + Data path: + 0 + 0.019999999552965164 + + + 0 + 0 + + + + + True + True + /data + gtk-edit + folder-open-symbolic + False + Select + Select + + + + 0 + 1 + + + + + + + True + False + Local file paths: + + + + False + True + 1 + @@ -810,6 +910,7 @@ Author: Dmitriy Yefremov + 140 True False 0.20000000298023224 @@ -820,15 +921,17 @@ Author: Dmitriy Yefremov False 5 5 - 5 5 vertical + 5 Enigma2 True True False + center + 5 True neutrino_radio_button @@ -854,6 +957,22 @@ Author: Dmitriy Yefremov 1 + + + Enable HTTP API + (experimental) + + True + True + False + True + + + False + True + 2 + + True @@ -863,7 +982,7 @@ Author: Dmitriy Yefremov False True 2 - 2 + 3 @@ -873,25 +992,29 @@ Author: Dmitriy Yefremov True True False + center + 5 True enigma_radio_button - True + False True - 3 + 4 - + True False + + + - False + True True - 2 - 4 + 5 @@ -900,7 +1023,6 @@ Author: Dmitriy Yefremov True True True - 3 reset_image True @@ -912,10 +1034,22 @@ Author: Dmitriy Yefremov 5 + + + True + False + + + False + True + 2 + 7 + + - + True False Active profile: @@ -935,97 +1069,6 @@ Author: Dmitriy Yefremov 2 - - - True - False - 5 - 5 - 5 - 5 - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - 2 - True - - - True - False - Picons path: - 0.019999999552965164 - - - 0 - 2 - - - - - True - True - /data/picons - gtk-edit - folder-open-symbolic - - - - 0 - 3 - - - - - True - False - Data path: - 0 - 0.019999999552965164 - - - 0 - 0 - - - - - True - True - /data - gtk-edit - folder-open-symbolic - False - Select - Select - - - - 0 - 1 - - - - - - - True - False - Local file paths: - - - - - False - True - 4 - - diff --git a/app/ui/settings_dialog.py b/app/ui/settings_dialog.py index f840e926..5c5a59b5 100644 --- a/app/ui/settings_dialog.py +++ b/app/ui/settings_dialog.py @@ -55,6 +55,7 @@ class SettingsDialog: self._enigma_radio_button = builder.get_object("enigma_radio_button") self._neutrino_radio_button = builder.get_object("neutrino_radio_button") self._support_ver5_check_button = builder.get_object("support_ver5_check_button") + self._support_http_api_check_button = builder.get_object("support_http_api_check_button") self._settings_stack = builder.get_object("settings_stack") self._info_bar = builder.get_object("info_bar") self._message_label = builder.get_object("info_bar_message_label") @@ -65,6 +66,7 @@ class SettingsDialog: profile = Profile(self._active_profile) self._neutrino_radio_button.set_active(profile is Profile.NEUTRINO_MP) self._support_ver5_check_button.set_sensitive(profile is not Profile.NEUTRINO_MP) + self._support_http_api_check_button.set_sensitive(profile is not Profile.NEUTRINO_MP) self._settings_stack.get_child_by_name(Property.HTTP.value).set_visible(profile is not Profile.NEUTRINO_MP) def show(self): @@ -86,6 +88,7 @@ class SettingsDialog: self._settings_stack.get_child_by_name(Property.HTTP.value).set_visible(profile is not Profile.NEUTRINO_MP) self.set_profile(profile) self._support_ver5_check_button.set_sensitive(profile is Profile.ENIGMA_2) + self._support_http_api_check_button.set_sensitive(profile is Profile.ENIGMA_2) def set_profile(self, profile): self._active_profile = profile.value @@ -123,6 +126,7 @@ class SettingsDialog: self._picons_dir_field.set_text(options.get("picons_dir_path", "")) if Profile(self._active_profile) is Profile.ENIGMA_2: self._support_ver5_check_button.set_active(options.get("v5_support", False)) + self._support_http_api_check_button.set_active(options.get("http_api_support", False)) def apply_settings(self, item=None): profile = Profile.ENIGMA_2 if self._enigma_radio_button.get_active() else Profile.NEUTRINO_MP @@ -148,6 +152,8 @@ class SettingsDialog: options["picons_dir_path"] = self._picons_dir_field.get_text() if profile is Profile.ENIGMA_2: options["v5_support"] = self._support_ver5_check_button.get_active() + options["http_api_support"] = self._support_http_api_check_button.get_active() + write_config(self._options) @run_task