X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=Navigation.py;h=eb1a2b14585c3e7ca09deb40c89758c6c248c99e;hb=100dc74896a9b2a921770118caaa104dae1a408c;hp=7b1deb030d049b6ed9dad5223f4c6149611c5d45;hpb=67b53c1cb06988394c35a6e965c99b72b67fe1be;p=vuplus_dvbapp diff --git a/Navigation.py b/Navigation.py index 7b1deb0..eb1a2b1 100644 --- a/Navigation.py +++ b/Navigation.py @@ -1,4 +1,4 @@ -from enigma import eServiceCenter, eServiceReference, pNavigation, getBestPlayableServiceReference +from enigma import eServiceCenter, eServiceReference, pNavigation, getBestPlayableServiceReference, iPlayableService from Components.ParentalControl import parentalControl from Tools.BoundFunction import boundFunction import RecordTimer @@ -32,6 +32,9 @@ class Navigation: def dispatchEvent(self, i): for x in self.event: x(i) + if i == iPlayableService.evEnd: + self.currentlyPlayingServiceReference = None + self.currentlyPlayingService = None def dispatchRecordEvent(self, rec_service, event): # print "record_event", rec_service, event @@ -44,8 +47,6 @@ class Navigation: print "ignore request to play already running service" return 0 print "playing", ref and ref.toString() - self.currentlyPlayingServiceReference = None - self.currentlyPlayingService = None if ref is None: self.stopService() return 0 @@ -98,19 +99,10 @@ class Navigation: print "stopService" if self.pnav: self.pnav.stopService() - self.currentlyPlayingService = None - self.currentlyPlayingServiceReference = None def pause(self, p): return self.pnav and self.pnav.pause(p) - def recordWithTimer(self, ref, begin, end, name, description, eit): - if isinstance(ref, eServiceReference): - ref = ServiceReference.ServiceReference(ref) - entry = RecordTimer.RecordTimerEntry(ref, begin, end, name, description, eit) - self.RecordTimer.record(entry) - return entry - def shutdown(self): self.RecordTimer.shutdown() self.ServiceHandler = None