use timemap instead of eventmap.. so the returned list is sorted by service and time
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 21 Mar 2006 20:07:26 +0000 (20:07 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 21 Mar 2006 20:07:26 +0000 (20:07 +0000)
lib/dvb/epgcache.cpp

index eb031be..7c7dd6b 100644 (file)
@@ -1946,16 +1946,16 @@ PyObject *eEPGCache::search(PyObject *arg)
                        }
                        PyObject *service_name=0;
                        PyObject *service_reference=0;
                        }
                        PyObject *service_name=0;
                        PyObject *service_reference=0;
-                       eventMap &evmap = cit->second.first;
+                       timeMap &evmap = cit->second.second;
                        // check all events
                        // check all events
-                       for (eventMap::iterator evit(evmap.begin()); evit != evmap.end() && maxcount; ++evit)
+                       for (timeMap::iterator evit(evmap.begin()); evit != evmap.end() && maxcount; ++evit)
                        {
                        {
+                               if (evit->second->getEventID() == eventid)
+                                       continue;
                                __u8 *data = evit->second->EITdata;
                                int tmp = evit->second->ByteSize-12;
                                __u32 *p = (__u32*)(data+12);
                                // check if any of our descriptor used by this event
                                __u8 *data = evit->second->EITdata;
                                int tmp = evit->second->ByteSize-12;
                                __u32 *p = (__u32*)(data+12);
                                // check if any of our descriptor used by this event
-                               if (evit->first == eventid )
-                                       continue;
                                int cnt=-1;
                                while(tmp>0)
                                {
                                int cnt=-1;
                                while(tmp>0)
                                {