diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2009-01-25 00:16:31 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-01-25 00:16:31 +0100 |
| commit | 64d62d01b8780f8c3fc76c4e7657c9eeb03128e7 (patch) | |
| tree | 7941450d906aa7e9ed588fc4cd45c023c65955c8 /lib/dvb/epgcache.cpp | |
| parent | 1eece08d8ee8d40aa3c88c201e2a7d072bae1620 (diff) | |
| download | enigma2-64d62d01b8780f8c3fc76c4e7657c9eeb03128e7.tar.gz enigma2-64d62d01b8780f8c3fc76c4e7657c9eeb03128e7.zip | |
skip dvb-text encoding bytes on exakt title search in epgcache
Diffstat (limited to 'lib/dvb/epgcache.cpp')
| -rw-r--r-- | lib/dvb/epgcache.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/dvb/epgcache.cpp b/lib/dvb/epgcache.cpp index 9bb8dfc6..d87a61e1 100644 --- a/lib/dvb/epgcache.cpp +++ b/lib/dvb/epgcache.cpp @@ -2173,18 +2173,24 @@ PyObject *eEPGCache::search(ePyObject arg) { if (title_len != textlen) continue; + int offs = 6; + // skip DVB-Text Encoding! + if (data[6] == 0x10) + offs+=2; + else if(data[6] > 0 && data[6] < 0x20) + offs+=1; if ( casetype ) { - if ( !strncasecmp((const char*)data+6, str, title_len) ) + if ( !strncasecmp((const char*)data+offs, str, title_len) ) { -// std::string s((const char*)data+6, title_len); +// std::string s((const char*)data+offs, title_len); // eDebug("match1 %s %s", str, s.c_str() ); descr[++descridx] = it->first; } } - else if ( !strncmp((const char*)data+6, str, title_len) ) + else if ( !strncmp((const char*)data+offs, str, title_len) ) { -// std::string s((const char*)data+6, title_len); +// std::string s((const char*)data+offs, title_len); // eDebug("match2 %s %s", str, s.c_str() ); descr[++descridx] = it->first; } |
