X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/979f7263f0c8807dce237fcfb5586112c55e5e20..939c323eadd7ec9d3656bfe59a46c630415bdb19:/lib/python/Screens/TimerEdit.py diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py index bb2d3c76..54354987 100644 --- a/lib/python/Screens/TimerEdit.py +++ b/lib/python/Screens/TimerEdit.py @@ -4,6 +4,7 @@ from Components.config import config from Components.MenuList import MenuList from Components.TimerList import TimerList from Components.TimerSanityCheck import TimerSanityCheck +from Components.UsageConfig import preferredTimerPath from RecordTimer import RecordTimerEntry, parseEvent, AFTEREVENT from Screen import Screen from Screens.ChoiceBox import ChoiceBox @@ -95,10 +96,11 @@ class TimerEditList(Screen): else: if t.isRunning(): if t.repeated: - list = [] - list.append((_("Stop current event but not coming events"), "stoponlycurrent")) - list.append((_("Stop current event and disable coming events"), "stopall")) - list.append((_("Don't stop current event but disable coming events"), "stoponlycoming")) + list = ( + (_("Stop current event but not coming events"), "stoponlycurrent"), + (_("Stop current event and disable coming events"), "stopall"), + (_("Don't stop current event but disable coming events"), "stoponlycoming") + ) self.session.openWithCallback(boundFunction(self.runningEventCallback, t), ChoiceBox, title=_("Repeating event currently recording... What do you want to do?"), list = list) else: t.disable() @@ -170,14 +172,11 @@ class TimerEditList(Screen): self.key_blue_choice = self.EMPTY def fillTimerList(self): - del self.list[:] - - for timer in self.session.nav.RecordTimer.timer_list: - self.list.append((timer, False)) - - for timer in self.session.nav.RecordTimer.processed_timers: - self.list.append((timer, True)) - self.list.sort(cmp = lambda x, y: x[0].begin < y[0].begin) + list = self.list + del list[:] + list.extend([(timer, False) for timer in self.session.nav.RecordTimer.timer_list]) + list.extend([(timer, True) for timer in self.session.nav.RecordTimer.processed_timers]) + list.sort(cmp = lambda x, y: x[0].begin < y[0].begin) def showLog(self): cur=self["timerlist"].getCurrent() @@ -245,7 +244,7 @@ class TimerEditList(Screen): else: data = parseEvent(event, description = False) - self.addTimer(RecordTimerEntry(serviceref, checkOldTimers = True, dirname = config.movielist.last_timer_videodir.value, *data)) + self.addTimer(RecordTimerEntry(serviceref, checkOldTimers = True, dirname = preferredTimerPath(), *data)) def addTimer(self, timer): self.session.openWithCallback(self.finishedAdd, TimerEntry, timer) @@ -272,7 +271,7 @@ class TimerEditList(Screen): else: success = True else: - succsess = True + success = True if success: print "Sanity check passed" self.session.nav.RecordTimer.timeChanged(entry)