fix -T -C channellisting stuff
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 27 Apr 2006 12:23:00 +0000 (12:23 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 27 Apr 2006 12:23:00 +0000 (12:23 +0000)
lib/dvb/db.cpp
lib/python/Screens/ChannelSelection.py
lib/service/iservice.h

index 0b1d4b5..1f38d15 100644 (file)
@@ -194,7 +194,7 @@ int eDVBService::checkFilter(const eServiceReferenceDVB &ref, const eDVBChannelQ
                res = 0;
                break;
        case eDVBChannelQuery::tSatellitePosition:
-               res = (ref.getDVBNamespace().get() >> 16) == query.m_int;
+               res = ((unsigned int)ref.getDVBNamespace().get())>>16 == query.m_int;
                break;
        case eDVBChannelQuery::tChannelID:
        {
index 7178ac6..9e29839 100644 (file)
@@ -692,7 +692,7 @@ class ChannelSelectionBase(Screen):
                                                        service = servicelist.getNext()
                                                        if not service.valid(): #check if end of list
                                                                break
-                                                       orbpos = service.getData(4) >> 16
+                                                       orbpos = service.getUnsignedData(4) >> 16
                                                        if service.getPath().find("FROM PROVIDER") != -1:
                                                                service_name = _("Providers")
                                                        else:
index fb56175..3a0e32c 100644 (file)
@@ -51,13 +51,26 @@ public:
        std::string getPath() { return path; }
        void setPath( const std::string &n ) { path=n; }
 
-       unsigned int getData(unsigned int num) const
+       unsigned int getUnsignedData(unsigned int num) const
        {
                if ( num < sizeof(data)/sizeof(int) )
                        return data[num];
                return 0;
        }
 
+       int getData(unsigned int num) const
+       {
+               if ( num < sizeof(data)/sizeof(int) )
+                       return data[num];
+               return 0;
+       }
+
+       void setUnsignedData(unsigned int num, unsigned int val)
+       {
+               if ( num < sizeof(data)/sizeof(int) )
+                       data[num] = val;
+       }
+
        void setData(unsigned int num, int val)
        {
                if ( num < sizeof(data)/sizeof(int) )