another exact title search in epgache fix
authorghost <andreas.monzner@multimedia-labs.de>
Sat, 24 Jan 2009 23:24:17 +0000 (00:24 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Sat, 24 Jan 2009 23:24:17 +0000 (00:24 +0100)
lib/dvb/epgcache.cpp

index 20767d3..6ab20bd 100644 (file)
@@ -2171,14 +2171,20 @@ PyObject *eEPGCache::search(ePyObject arg)
                                                        int title_len = data[5];
                                                        if ( querytype == 1 )
                                                        {
                                                        int title_len = data[5];
                                                        if ( querytype == 1 )
                                                        {
-                                                               if (title_len != textlen)
-                                                                       continue;
                                                                int offs = 6;
                                                                // skip DVB-Text Encoding!
                                                                if (data[6] == 0x10)
                                                                int offs = 6;
                                                                // skip DVB-Text Encoding!
                                                                if (data[6] == 0x10)
+                                                               {
                                                                        offs+=3;
                                                                        offs+=3;
+                                                                       textlen-=3;
+                                                               }
                                                                else if(data[6] > 0 && data[6] < 0x20)
                                                                else if(data[6] > 0 && data[6] < 0x20)
+                                                               {
                                                                        offs+=1;
                                                                        offs+=1;
+                                                                       textlen-=1;
+                                                               }
+                                                               if (title_len != textlen)
+                                                                       continue;
                                                                if ( casetype )
                                                                {
                                                                        if ( !strncasecmp((const char*)data+offs, str, title_len) )
                                                                if ( casetype )
                                                                {
                                                                        if ( !strncasecmp((const char*)data+offs, str, title_len) )