from Components.ActionMap import ActionMap, HelpableActionMap
from Components.ActionMap import NumberActionMap
-from Components.BlinkingPixmap import BlinkingPixmapConditional
from Components.Harddisk import harddiskmanager
from Components.Input import Input
from Components.Label import Label
-from Components.Pixmap import Pixmap
from Components.PluginComponent import plugins
from Components.ServiceEventTracker import ServiceEventTracker
from Components.Sources.Boolean import Boolean
from Tools.Directories import SCOPE_HDD, resolveFilename, pathExists
from enigma import eTimer, eServiceCenter, eDVBServicePMTHandler, iServiceInformation, \
- iPlayableService, eServiceReference, eDVBResourceManager, iFrontendInformation, eEPGCache
+ iPlayableService, eServiceReference, eEPGCache
from time import time, localtime, strftime
from os import stat as os_stat
InfoBarPVRState.__init__(self, screen=TimeshiftState)
def _mayShow(self):
- if self.execing and self.timeshift_enabled:
+ if self.execing and self.timeshift_enabled and self.seekstate != self.SEEK_STATE_PLAY:
self.pvrStateDialog.show()
class InfoBarShowMovies:
def runPlugin(self, plugin):
plugin(session = self.session, servicelist = self.servicelist)
+from Components.Task import job_manager
+class InfoBarJobman:
+ def __init__(self):
+ self.addExtension(extension = self.getJobList, type = InfoBarExtensions.EXTENSION_LIST)
+
+ def getJobList(self):
+ list = []
+ for job in job_manager.getPendingJobs():
+ list.append(((boundFunction(self.getJobName, job), boundFunction(self.showJobView, job), lambda: True), None))
+ return list
+
+ def getJobName(self, job):
+ statustext = {job.NOT_STARTED: _("Waiting"), job.IN_PROGRESS: _("In Progress"), job.FINISHED: _("Finished"), job.FAILED: _("Failed")}[job.status]
+ return "%s: %s (%d%%)" % (statustext, job.name, int(100*job.progress/float(job.end)))
+
+ def showJobView(self, job):
+ from Screens.TaskView import JobView
+ job_manager.in_background = False
+ self.session.openWithCallback(self.JobViewCB, JobView, job)
+
+ def JobViewCB(self, in_background):
+ from Screens.TaskView import JobView
+ job_manager.in_background = in_background
+
# depends on InfoBarExtensions
class InfoBarSleepTimer:
def __init__(self):
self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
{
- iPlayableService.evUpdatedInfo: self.checkSubservicesAvail
+ iPlayableService.evUpdatedEventInfo: self.checkSubservicesAvail
})
self.bsel = None
class InfoBarAdditionalInfo:
def __init__(self):
- self["RecordingPossible"] = Boolean(fixed=harddiskmanager.HDDCount() > 0)
+ self["RecordingPossible"] = Boolean(fixed=harddiskmanager.HDDCount() > 0 and config.misc.rcused.value == 1)
self["TimeshiftPossible"] = self["RecordingPossible"]
+ self["ShowTimeshiftOnYellow"] = Boolean(fixed=(not config.misc.rcused.value == 0))
+ self["ShowAudioOnYellow"] = Boolean(fixed=config.misc.rcused.value == 0)
+ self["ShowRecordOnRed"] = Boolean(fixed=config.misc.rcused.value == 1)
self["ExtensionsAvailable"] = Boolean(fixed=1)
class InfoBarNotifications: