void eListboxEPGContent::setRoot(const eServiceReference &root)
{
- eEPGCache *epg=NULL;
- if ( !eEPGCache::getInstance(epg) )
+ eEPGCache *epg=eEPGCache::getInstance();
+ if ( epg )
{
m_list.clear();
m_root = root;
#endif
}
-RESULT eEPGCache::getInstance(eEPGCache *&ptr)
-{
- ptr = instance;
- if (!ptr)
- return -1;
- return 0;
-}
-
eEPGCache::channel_data::channel_data(eEPGCache *ml)
:cache(ml)
,abortTimer(ml), zapTimer(ml)
timeMap::iterator m_timemap_cursor, m_timemap_end;
#endif // SWIG
public:
- static RESULT getInstance(eEPGCache *&ptr);
+ static eEPGCache *getInstance() { return instance; }
eEPGCache();
~eEPGCache();
// eServiceEvent are parsed epg events.. it's safe to use them after cache unlock
// for use from python ( members: m_start_time, m_duration, m_short_description, m_extended_description )
RESULT lookupEvent(const eServiceReference &service, int event_id, ePtr<eServiceEvent> &);
- RESULT lookupEvent(const eServiceReference &service, time_t , ePtr<eServiceEvent> &);
+ RESULT lookupEvent(const eServiceReference &service, time_t, ePtr<eServiceEvent> &);
RESULT getNextTimeEntry(ePtr<eServiceEvent> &);
};
from Components.ServiceList import ServiceList
from Components.ActionMap import ActionMap
from EpgSelection import EPGSelection
-from enigma import eServiceReference
+from enigma import eServiceReference, eEPGCache, eEPGCachePtr
from Screens.FixedMenu import FixedMenu
self["actions"].csel = self
def showEPGList(self):
- self.session.open(EPGSelection, self["list"].getCurrent())
+ ref=self["list"].getCurrent()
+ ptr=eEPGCache.getInstance()
+ if ptr.startTimeQuery(ref) != -1:
+ self.session.open(EPGSelection, ref)
+ else:
+ print 'no epg for service', ref.toString()
# marked edit mode
def startMarkedEdit(self):
self.muteDialog.instance.hide()
def showEPGList(self):
- self.session.open(EPGSelection, self.session.nav.getCurrentlyPlayingServiceReference())
+ ref=self.session.nav.getCurrentlyPlayingServiceReference()
+ ptr=eEPGCache.getInstance()
+ if ptr.startTimeQuery(ref) != -1:
+ self.session.open(EPGSelection, ref)
+ else:
+ print 'no epg for service', ref.toString()
def quit(self):
self.session.open(Standby)