another exact title search in epgache fix
[enigma2.git] / lib / dvb / epgcache.cpp
index 20767d37fcd18c386762479b6ff857f29e3f6136..6ab20bdab0cb47b0dee088ec71709e0bd72402b4 100644 (file)
@@ -2171,14 +2171,20 @@ PyObject *eEPGCache::search(ePyObject arg)
                                                        int title_len = data[5];
                                                        if ( querytype == 1 )
                                                        {
-                                                               if (title_len != textlen)
-                                                                       continue;
                                                                int offs = 6;
                                                                // skip DVB-Text Encoding!
                                                                if (data[6] == 0x10)
+                                                               {
                                                                        offs+=3;
+                                                                       textlen-=3;
+                                                               }
                                                                else if(data[6] > 0 && data[6] < 0x20)
+                                                               {
                                                                        offs+=1;
+                                                                       textlen-=1;
+                                                               }
+                                                               if (title_len != textlen)
+                                                                       continue;
                                                                if ( casetype )
                                                                {
                                                                        if ( !strncasecmp((const char*)data+offs, str, title_len) )