From 780bda1f124c4984256ddad53b41207fd231103b Mon Sep 17 00:00:00 2001 From: DYefremov Date: Tue, 26 Nov 2024 20:37:20 +0300 Subject: [PATCH] data read adjustment --- app/eparser/enigma/lamedb.py | 2 ++ app/ui/service_details_dialog.py | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/eparser/enigma/lamedb.py b/app/eparser/enigma/lamedb.py index f2e2c33f..4ccb5603 100644 --- a/app/eparser/enigma/lamedb.py +++ b/app/eparser/enigma/lamedb.py @@ -172,6 +172,8 @@ def parse_services(self, services_data, transponders): onid = str(data[1]).lstrip(sp).upper() # For comparison in bouquets. Needed in upper case!!! fav_id = f"1:0:{srv_type:X}:{ssid}:{tid}:{nid}:{onid}:0:0:0:" + if len(data) > 9: + fav_id = f"{fav_id}:0:0:0:0" picon_id = f"1_0_{srv_type:X}_{ssid}_{tid}_{nid}_{onid}_0_0_0.png" all_flags = srv[2].split(",") diff --git a/app/ui/service_details_dialog.py b/app/ui/service_details_dialog.py index 78911971..1eaed8c6 100644 --- a/app/ui/service_details_dialog.py +++ b/app/ui/service_details_dialog.py @@ -303,6 +303,7 @@ def init_enigma2_transponder_data(self, srv): data = srv.data_id.split(":") tr_data = srv.transponder.split(":") tr_type = TrType(srv.transponder_type) + data_len = len(tr_data) self._namespace_entry.set_text(str(int(data[1], 16))) self._transponder_id_entry.set_text(str(int(data[2], 16))) @@ -311,11 +312,12 @@ def init_enigma2_transponder_data(self, srv): if tr_type is TrType.Satellite: self.select_active_text(self._invertion_combo_box, Inversion(tr_data[5]).name) if srv.system == "DVB-S2": - self.select_active_text(self._mod_combo_box, MODULATION.get(tr_data[8])) - self.select_active_text(self._rolloff_combo_box, ROLL_OFF.get(tr_data[9])) - self.select_active_text(self._pilot_combo_box, Pilot(tr_data[10]).name) - self._tr_flag_entry.set_text(tr_data[7]) - if len(tr_data) > 12: + if data_len > 9: + self.select_active_text(self._mod_combo_box, MODULATION.get(tr_data[8])) + self.select_active_text(self._rolloff_combo_box, ROLL_OFF.get(tr_data[9])) + self.select_active_text(self._pilot_combo_box, Pilot(tr_data[10]).name) + self._tr_flag_entry.set_text(tr_data[7]) + if data_len > 12: self._stream_id_entry.set_text(tr_data[11]) self._pls_code_entry.set_text(tr_data[12]) self.select_active_text(self._pls_mode_combo_box, PLS_MODE.get(tr_data[13]))