X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a3bbc85871508cbf24edea513a5f69a14ee76e33..7e3fc622d3a9dfcec4009d3fff223c6303e497ab:/lib/dvb/db.cpp diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index 6b6aa033..f3d44821 100644 --- a/lib/dvb/db.cpp +++ b/lib/dvb/db.cpp @@ -615,7 +615,7 @@ void eDVBDB::loadBouquet(const char *path) break; if (line[0]=='#') { - if (!strncmp(line, "#SERVICE ", 9) || !strncmp(line, "#SERVICE: ", 10)) + if (!strncmp(line, "#SERVICE", 8)) { int offs = line[8] == ':' ? 10 : 9; eServiceReference tmp(line+offs); @@ -662,9 +662,10 @@ void eDVBDB::loadBouquet(const char *path) read_descr=true; ++entries; } - else if (read_descr && !strncmp(line, "#DESCRIPTION ", 13)) + else if (read_descr && !strncmp(line, "#DESCRIPTION", 12)) { - e->name = line+13; + int offs = line[12] == ':' ? 14 : 13; + e->name = line+offs; read_descr=false; } else if (!strncmp(line, "#NAME ", 6)) @@ -770,6 +771,8 @@ RESULT eDVBDB::removeServices(eDVBChannelID chid, unsigned int orbpos) if ((unsigned int)sat.orbital_position != orbpos) remove=false; } + else if (orbpos != 0xFFFFFFFF) // do not remove -C or -T transponders when a orbital position is given.. + remove=false; if ( remove && chid.dvbnamespace != eNs && chid.dvbnamespace != ch.dvbnamespace ) remove=false; if ( remove && chid.original_network_id != eOnid && chid.original_network_id != ch.original_network_id ) @@ -1374,9 +1377,18 @@ RESULT parseExpression(ePtr &res, std::list::cons } res->m_string = val; - res->m_int = atoi(val.c_str()); -// res->m_channelid = eDVBChannelID(val); - + + if (res->m_type == eDVBChannelQuery::tChannelID) + { + int ns, tsid, onid; + if (sscanf(val.c_str(), "%08x%04x%04x", &ns, &tsid, &onid) == 3) + res->m_channelid = eDVBChannelID(eDVBNamespace(ns), eTransportStreamID(tsid), eOriginalNetworkID(onid)); + else + eDebug("couldn't parse channelid !! format should be hex NNNNNNNNTTTTOOOO (namespace, tsid, onid)"); + } + else + res->m_int = atoi(val.c_str()); + return 0; }