Small fix options 'advanced priority tuner'
authorDima73 <Dima-73@inbox.lv>
Sat, 19 Sep 2015 09:23:58 +0000 (12:23 +0300)
committerErik Slagter <erik@openpli.org>
Sat, 19 Sep 2015 10:00:30 +0000 (12:00 +0200)
Signed-off-by: Erik Slagter <erik@openpli.org>

Navigation.py
RecordTimer.py
lib/python/Components/UsageConfig.py

index 4da0190..ca02fb0 100644 (file)
@@ -97,9 +97,9 @@ class Navigation:
                                self.currentlyPlayingServiceOrGroup = ref
                                if InfoBarInstance and InfoBarInstance.servicelist.servicelist.setCurrent(ref, adjust):
                                        self.currentlyPlayingServiceOrGroup = InfoBarInstance.servicelist.servicelist.getCurrent()
-                               dvb_service = '%3a//' not in playref.toString() and not playref.toString().rsplit(":", 1)[1].startswith("/")
                                setPriorityFrontend = False
-                               if dvb_service:
+                               str_service = playref.toString()
+                               if '%3a//' not in str_service and not str_service.rsplit(":", 1)[1].startswith("/"):
                                        type_service = playref.getUnsignedData(4) >> 16
                                        if type_service == 0xEEEE:
                                                if SystemInfo["DVB-T_priority_tuner_available"] and config.usage.frontend_priority_dvbt.value != "-2":
index 423aab5..6c1e14e 100644 (file)
@@ -172,8 +172,8 @@ class RecordTimerEntry(timer.TimerEntry, object):
                self.rename_repeat = rename_repeat
                self.setAdvancedPriorityFrontend = None
                rec_ref = self.service_ref and self.service_ref.ref
-               dvb_service = rec_ref and '%3a//' not in rec_ref.toString() and not rec_ref.toString().rsplit(":", 1)[1].startswith("/")
-               if dvb_service:
+               str_service = rec_ref and rec_ref.toString()
+               if '%3a//' not in str_service and not str_service.rsplit(":", 1)[1].startswith("/"):
                        type_service = rec_ref.getUnsignedData(4) >> 16
                        if type_service == 0xEEEE:
                                if SystemInfo["DVB-T_priority_tuner_available"] and config.usage.recording_frontend_priority_dvbt.value != "-2":
index e8dd0b1..743b4ac 100644 (file)
@@ -212,15 +212,15 @@ def InitUsageConfig():
        config.usage.frontend_priority_dvbc = ConfigSelection(default = "-2", choices = list(dvbc_nims))
        dvbc_nims.insert(1,("-1", _("auto")))
        config.usage.recording_frontend_priority_dvbc = ConfigSelection(default = "-2", choices = dvbc_nims)
-       if len(dvbs_nims) > 2 and (len(dvbt_nims) > 1 or len(dvbc_nims) > 1):
+       if len(dvbs_nims) > 3 and (len(dvbt_nims) > 2 or len(dvbc_nims) > 2):
                SystemInfo["DVB-S_priority_tuner_available"] = True
        else:
                SystemInfo["DVB-S_priority_tuner_available"] = False
-       if len(dvbt_nims) > 2 and (len(dvbs_nims) > 1 or len(dvbc_nims) > 1):
+       if len(dvbt_nims) > 3 and (len(dvbs_nims) > 2 or len(dvbc_nims) > 2):
                SystemInfo["DVB-T_priority_tuner_available"] = True
        else:
                SystemInfo["DVB-T_priority_tuner_available"] = False
-       if len(dvbc_nims) > 2 and (len(dvbs_nims) > 1 or len(dvbt_nims) > 1):
+       if len(dvbc_nims) > 3 and (len(dvbs_nims) > 2 or len(dvbt_nims) > 2):
                SystemInfo["DVB-C_priority_tuner_available"] = True
        else:
                SystemInfo["DVB-C_priority_tuner_available"] = False