X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/1076e4717bcf0eb93d803f73b2b75a8ae192b143..1bd22cc97199c878255925ef2a9032881acef470:/lib/python/Screens/InfoBarGenerics.py diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 050e350b..3404e3f9 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -29,7 +29,7 @@ from Screens.TimeDateInput import TimeDateInput from ServiceReference import ServiceReference from Tools import Notifications -from Tools.Directories import SCOPE_HDD, resolveFilename, pathExists +from Tools.Directories import SCOPE_HDD, resolveFilename, fileExists from enigma import eTimer, eServiceCenter, eDVBServicePMTHandler, iServiceInformation, \ iPlayableService, eServiceReference, eEPGCache @@ -1024,7 +1024,13 @@ class InfoBarPVRState: def __playStateChanged(self, state): playstateString = state[3] self.pvrStateDialog["state"].setText(playstateString) - self._mayShow() + + # if we return into "PLAY" state, ensure that the dialog gets hidden if there will be no infobar displayed + if not config.usage.show_infobar_on_skip.value and self.seekstate == self.SEEK_STATE_PLAY: + self.pvrStateDialog.hide() + else: + self._mayShow() + class InfoBarTimeshiftState(InfoBarPVRState): def __init__(self): @@ -1215,7 +1221,7 @@ class InfoBarExtensions: self["InstantExtensionsActions"] = HelpableActionMap(self, "InfobarExtensions", { "extensions": (self.showExtensionSelection, _("view extensions...")), - }) + }, 1) # lower priority def addExtension(self, extension, key = None, type = EXTENSION_SINGLE): self.list.append((type, extension, key)) @@ -1449,10 +1455,28 @@ class InfoBarInstantRecord: recording = RecordTimerEntry(serviceref, begin, end, name, description, eventid, dirname = config.movielist.last_videodir.value) recording.dontSave = True - recording.autoincrease = True - if recording.setAutoincreaseEnd(): - self.session.nav.RecordTimer.record(recording) - self.recording.append(recording) + + if event is None or limitEvent == False: + recording.autoincrease = True + if recording.setAutoincreaseEnd(): + self.session.nav.RecordTimer.record(recording) + self.recording.append(recording) + else: + simulTimerList = self.session.nav.RecordTimer.record(recording) + if simulTimerList is not None: # conflict with other recording + name = simulTimerList[1].name + name_date = name + strftime(" %c", localtime(simulTimerList[1].begin)) + print "[TIMER] conflicts with", name_date + recording.autoincrease = True # start with max available length, then increment + if recording.setAutoincreaseEnd(): + self.session.nav.RecordTimer.record(recording) + self.recording.append(recording) + self.session.open(MessageBox, _("Record time limited due to conflicting timer %s") % name_date, MessageBox.TYPE_INFO) + else: + self.session.open(MessageBox, _("Couldn't record due to conflicting timer %s") % name, MessageBox.TYPE_INFO) + recording.autoincrease = False + else: + self.recording.append(recording) def isInstantRecordRunning(self): print "self.recording:", self.recording @@ -1530,7 +1554,7 @@ class InfoBarInstantRecord: def instantRecord(self): dir = config.movielist.last_videodir.value - if not pathExists(dir): + if not fileExists(dir, 'w'): dir = resolveFilename(SCOPE_HDD) try: stat = os_stat(dir) @@ -1542,21 +1566,21 @@ class InfoBarInstantRecord: if self.isInstantRecordRunning(): self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \ title=_("A recording is currently running.\nWhat do you want to do?"), \ - list=[(_("stop recording"), "stop"), \ - (_("change recording (duration)"), "changeduration"), \ - (_("change recording (endtime)"), "changeendtime"), \ - (_("add recording (indefinitely)"), "indefinitely"), \ - (_("add recording (stop after current event)"), "event"), \ + list=[(_("add recording (stop after current event)"), "event"), \ (_("add recording (enter recording duration)"), "manualduration"), \ (_("add recording (enter recording endtime)"), "manualendtime"), \ + (_("add recording (indefinitely)"), "indefinitely"), \ + (_("change recording (duration)"), "changeduration"), \ + (_("change recording (endtime)"), "changeendtime"), \ + (_("stop recording"), "stop"), \ (_("do nothing"), "no")]) else: self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \ title=_("Start recording?"), \ - list=[(_("add recording (indefinitely)"), "indefinitely"), \ - (_("add recording (stop after current event)"), "event"), \ + list=[(_("add recording (stop after current event)"), "event"), \ (_("add recording (enter recording duration)"), "manualduration"), \ (_("add recording (enter recording endtime)"), "manualendtime"), \ + (_("add recording (indefinitely)"), "indefinitely"), \ (_("don't record"), "no")]) from Tools.ISO639 import LanguageCodes