self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions",
{
"showEventInfo": (self.openEventView, _("show event details")),
+ "showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible,
})
+ def showEventInfoWhenNotVisible(self):
+ if self.shown:
+ self.openEventView()
+ else:
+ self.toggleShow()
+ return 1
+
def openEventView(self):
epglist = [ ]
self.epglist = epglist
iPlayableService.evSOF: self.__evSOF,
})
- self.minSpeedBackward = useSeekBackHack and 16 or 0
-
class InfoBarSeekActionMap(HelpableActionMap):
def __init__(self, screen, *args, **kwargs):
HelpableActionMap.__init__(self, screen, *args, **kwargs)
self.__seekableStatusChanged()
def makeStateForward(self, n):
- minspeed = config.seek.stepwise_minspeed.value
- repeat = int(config.seek.stepwise_repeat.value)
- if minspeed != "Never" and n >= int(minspeed) and repeat > 1:
- return (0, n * repeat, repeat, ">> %dx" % n)
- else:
+# minspeed = config.seek.stepwise_minspeed.value
+# repeat = int(config.seek.stepwise_repeat.value)
+# if minspeed != "Never" and n >= int(minspeed) and repeat > 1:
+# return (0, n * repeat, repeat, ">> %dx" % n)
+# else:
return (0, n, 0, ">> %dx" % n)
def makeStateBackward(self, n):
- minspeed = config.seek.stepwise_minspeed.value
- repeat = int(config.seek.stepwise_repeat.value)
- if self.minSpeedBackward and n < self.minSpeedBackward:
- r = (self.minSpeedBackward - 1)/ n + 1
- if minspeed != "Never" and n >= int(minspeed) and repeat > 1:
- r = max(r, repeat)
- return (0, -n * r, r, "<< %dx" % n)
- elif minspeed != "Never" and n >= int(minspeed) and repeat > 1:
- return (0, -n * repeat, repeat, "<< %dx" % n)
- else:
+# minspeed = config.seek.stepwise_minspeed.value
+# repeat = int(config.seek.stepwise_repeat.value)
+# if minspeed != "Never" and n >= int(minspeed) and repeat > 1:
+# return (0, -n * repeat, repeat, "<< %dx" % n)
+# else:
return (0, -n, 0, "<< %dx" % n)
def makeStateSlowMotion(self, n):
if config.seek.on_pause.value == "play":
self.unPauseService()
elif config.seek.on_pause.value == "step":
- self.doSeekRelative(0)
+ self.doSeekRelative(1)
elif config.seek.on_pause.value == "last":
self.setSeekState(self.lastseekstate)
self.lastseekstate = self.SEEK_STATE_PLAY
self.setSeekState(self.makeStateBackward(int(config.seek.enter_backward.value)))
self.doSeekRelative(-6)
elif seekstate == self.SEEK_STATE_PAUSE:
- self.doSeekRelative(-3)
+ self.doSeekRelative(-1)
elif self.isStateForward(seekstate):
speed = seekstate[1]
if seekstate[2]:
# depends on InfoBarExtensions
class InfoBarPiP:
def __init__(self):
- self.session.pipshown = False
+ try:
+ self.session.pipshown
+ except:
+ self.session.pipshown = False
if SystemInfo.get("NumVideoDecoders", 1) > 1:
- self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue")
- self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
- self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow")
+ if (self.allowPiP):
+ self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue")
+ self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
+ self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow")
+ else:
+ self.addExtension((self.getShowHideName, self.showPiP, self.pipShown), "blue")
+ self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
def pipShown(self):
return self.session.pipshown
if self.isInstantRecordRunning():
self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \
title=_("A recording is currently running.\nWhat do you want to do?"), \
- list=((_("add recording (stop after current event)"), "event"), \
+ list=((_("stop recording"), "stop"), \
+ (_("add recording (stop after current event)"), "event"), \
+ (_("add recording (indefinitely)"), "indefinitely"), \
(_("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 (stop after current event)"), "event"), \
+ (_("add recording (indefinitely)"), "indefinitely"), \
(_("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
idx = 0
while idx < n:
+ cnt = 0
i = audio.getTrackInfo(idx)
- language = i.getLanguage()
+ languages = i.getLanguage().split('/')
description = i.getDescription()
+ language = ""
- if LanguageCodes.has_key(language):
- language = LanguageCodes[language][0]
+ for lang in languages:
+ if cnt:
+ language += ' / '
+ if LanguageCodes.has_key(lang):
+ language += LanguageCodes[lang][0]
+ else:
+ language += lang
+ cnt += 1
if len(description):
description += " (" + language + ")"
self.__selected_subtitle = None
def __serviceStopped(self):
- self.subtitle_window.hide()
- self.__subtitles_enabled = False
self.cached_subtitle_checked = False
+ if self.__subtitles_enabled:
+ self.subtitle_window.hide()
+ self.__subtitles_enabled = False
+ self.__selected_subtitle = None
def __updatedInfo(self):
if not self.cached_subtitle_checked:
- subtitle = self.getCurrentServiceSubtitle()
self.cached_subtitle_checked = True
- self.__selected_subtitle = subtitle and subtitle.getCachedSubtitle()
+ subtitle = self.getCurrentServiceSubtitle()
+ self.setSelectedSubtitle(subtitle and subtitle.getCachedSubtitle())
if self.__selected_subtitle:
- subtitle.enableSubtitles(self.subtitle_window.instance, self.selected_subtitle)
- self.subtitle_window.show()
- self.__subtitles_enabled = True
+ self.setSubtitlesEnable(True)
def getCurrentServiceSubtitle(self):
service = self.session.nav.getCurrentService()
def setSubtitlesEnable(self, enable=True):
subtitle = self.getCurrentServiceSubtitle()
- if enable and self.__selected_subtitle is not None:
- if subtitle and not self.__subtitles_enabled:
- subtitle.enableSubtitles(self.subtitle_window.instance, self.selected_subtitle)
- self.subtitle_window.show()
- self.__subtitles_enabled = True
+ if enable:
+ if self.__selected_subtitle:
+ if subtitle and not self.__subtitles_enabled:
+ subtitle.enableSubtitles(self.subtitle_window.instance, self.selected_subtitle)
+ self.subtitle_window.show()
+ self.__subtitles_enabled = True
else:
if subtitle:
subtitle.disableSubtitles(self.subtitle_window.instance)
+ self.__selected_subtitle = False
self.__subtitles_enabled = False
self.subtitle_window.hide()