show "Current Transponder" entry in ChannelSelection -> Satellites
[enigma2.git] / lib / dvb / db.cpp
index cf65569081aa8bd125eda4686d4e58a754501687..f3d44821254044ab2a22e97dbbf5a90482826f3c 100644 (file)
@@ -668,11 +668,8 @@ void eDVBDB::loadBouquet(const char *path)
                                e->name = line+offs;
                                read_descr=false;
                        }
-                       else if (!strncmp(line, "#NAME ", 6) || !strncmp(line, "#NAME: ", 7))
-                       {
-                               int offs = line[5] == ':' ? 7 : 6;
-                               bouquet.m_bouquet_name=line+offs;
-                       }
+                       else if (!strncmp(line, "#NAME ", 6))
+                               bouquet.m_bouquet_name=line+6;
                        continue;
                }
        }
@@ -774,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 )
@@ -1378,9 +1377,18 @@ RESULT parseExpression(ePtr<eDVBChannelQuery> &res, std::list<std::string>::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;
 }