add workaround also for duplicate(non dvb compliant) tsid/nid combinations in cable /
[enigma2.git] / lib / dvb / db.cpp
index b40b7373a4d7e3254404c0ce37f8fd8b975d5758..e4a9771304ccbe26a572c1dc66622374dd5cd24f 100644 (file)
@@ -863,6 +863,8 @@ PyObject *eDVBDB::readSatellites(ePyObject sat_list, ePyObject sat_dict, ePyObje
                                Py_DECREF(sat_pos);
                        if (sat_name)
                                Py_DECREF(sat_name);
+                       if (sat_flags)
+                               Py_DECREF(sat_flags);
                }
        }
        Py_INCREF(Py_True);
@@ -1158,10 +1160,15 @@ 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.dvbnamespace != eNs )
+               {
+                       if (system == iDVBFrontend::feCable && chid.dvbnamespace.get() == 0xFFFF0000)
+                               ;
+                       else if (system == iDVBFrontend::feTerrestrial && chid.dvbnamespace.get() == 0xEEEE0000)
+                               ;
+                       else if ( chid.dvbnamespace != ch.dvbnamespace )
+                               remove=false;
+               }
                if ( remove && chid.original_network_id != eOnid && chid.original_network_id != ch.original_network_id )
                        remove=false;
                if ( remove && chid.transport_stream_id != eTsid && chid.transport_stream_id != ch.transport_stream_id )
@@ -1247,8 +1254,15 @@ RESULT eDVBDB::removeFlags(unsigned int flagmask, eDVBChannelID chid, unsigned i
                        if ((unsigned int)sat.orbital_position != orbpos)
                                remove=false;
                }
-               if ( remove && chid.dvbnamespace != eNs && chid.dvbnamespace != ch.dvbnamespace )
-                       remove=false;
+               if ( remove && chid.dvbnamespace != eNs )
+               {
+                       if (system == iDVBFrontend::feCable && chid.dvbnamespace.get() == 0xFFFF0000)
+                               ;
+                       else if (system == iDVBFrontend::feTerrestrial && chid.dvbnamespace.get() == 0xEEEE0000)
+                               ;
+                       else if ( chid.dvbnamespace != ch.dvbnamespace )
+                               remove=false;
+               }
                if ( remove && chid.original_network_id != eOnid && chid.original_network_id != ch.original_network_id )
                        remove=false;
                if ( remove && chid.transport_stream_id != eTsid && chid.transport_stream_id != ch.transport_stream_id )