X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=RecordTimer.py;h=d831249384efafe27f60cb33c8839533fdb08e06;hb=f8b2d4c7def72fdc8011217a440caf9943ea8a19;hp=1d343952d7103ce3999386b0dd482e7363a71a9a;hpb=9b843d26103fef93110a107d0bf0e60dea9064d0;p=vuplus_dvbapp diff --git a/RecordTimer.py b/RecordTimer.py index 1d34395..d831249 100644 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -7,7 +7,7 @@ from Components.config import config import timer import xml.dom.minidom -from enigma import quitMainloop, eEPGCache, eEPGCachePtr +from enigma import quitMainloop, eEPGCache from Screens.MessageBox import MessageBox import NavigationInstance @@ -31,8 +31,8 @@ def parseEvent(ev): begin = ev.getBeginTime() end = begin + ev.getDuration() eit = ev.getEventId() - begin -= config.recording.margin_before.value[0] * 60 - end += config.recording.margin_after.value[0] * 60 + begin -= config.recording.margin_before.value * 60 + end += config.recording.margin_after.value * 60 return (begin, end, name, description, eit) class AFTEREVENT: @@ -158,7 +158,7 @@ class RecordTimerEntry(timer.TimerEntry): self.log(7, "prepare failed") if self.first_try_prepare: self.first_try_prepare = False - if config.recording.asktozap.value == 0: + if not config.recording.asktozap.value: self.log(8, "asking user to zap away") Notifications.AddNotificationWithCallback(self.failureCB, MessageBox, _("A timer failed to record!\nDisable TV and try again?\n"), timeout=20) else: # zap without asking @@ -232,7 +232,7 @@ class RecordTimerEntry(timer.TimerEntry): def createTimer(xml): begin = int(xml.getAttribute("begin")) end = int(xml.getAttribute("end")) - serviceref = ServiceReference(str(xml.getAttribute("serviceref"))) + serviceref = ServiceReference(xml.getAttribute("serviceref").encode("utf-8")) description = xml.getAttribute("description").encode("utf-8") repeated = xml.getAttribute("repeated").encode("utf-8") disabled = long(xml.getAttribute("disabled") or "0")