changes for identify -C and -T services
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 27 Apr 2006 10:44:22 +0000 (10:44 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 27 Apr 2006 10:44:22 +0000 (10:44 +0000)
lib/dvb/frontend.cpp
lib/python/Screens/ChannelSelection.py

index bb6b8b5..51d2110 100644 (file)
@@ -292,7 +292,11 @@ RESULT eDVBFrontendParameters::getHash(unsigned long &hash) const
                return 0;
        }
        case iDVBFrontend::feCable:
+               hash = 0xFFFF0000;
+               return 0;
        case iDVBFrontend::feTerrestrial:
+               hash = 0xEEEE0000;
+               return 0;
        default:
                return -1;
        }
index 32c3b10..83962e0 100644 (file)
@@ -701,12 +701,17 @@ class ChannelSelectionBase(Screen):
                                                                service_name += str(' - %s'%(nimmanager.getSatDescription(orbpos)))
                                                                service.setName(service_name) # why we need this cast?
                                                        except:
-                                                               if orbpos > 1800: # west
-                                                                       orbpos = 3600 - orbpos
-                                                                       h = _("W")
+                                                               if orbpos == 0xFFFF0000: #Cable
+                                                                       n = ("%s (%s)") % (service_name, _("Cable"))
+                                                               elif orbpos == 0xEEEE0000: #Terrestrial
+                                                                       n = ("%s (%s)") % (service_name, _("Terrestrial"))
                                                                else:
-                                                                       h = _("E")
-                                                               n = ("%s (%d.%d" + h + ")") % (service_name, orbpos / 10, orbpos % 10)
+                                                                       if orbpos > 1800: # west
+                                                                               orbpos = 3600 - orbpos
+                                                                               h = _("W")
+                                                                       else:
+                                                                               h = _("E")
+                                                                       n = ("%s (%d.%d" + h + ")") % (service_name, orbpos / 10, orbpos % 10)
                                                                service.setName(n)
                                                        self.servicelist.addService(service)
                                                        self.servicelist.finishFill()