from Tools.ISO639 import LanguageCodes
+# ikseong for subtitle hotkey
+from Screens.InfoBar import InfoBar
+
class Subtitles(Screen, ConfigListScreen):
- def __init__(self, session):
+ def __init__(self, session, infobar=None):
Screen.__init__(self, session)
self["actions"] = ActionMap(["SetupActions"],
self.list = []
ConfigListScreen.__init__(self, self.list)
- self.infobar = self.session.infobar
+# ikseong for subtitle hotkey
+ if self.session.infobar is None:
+ if InfoBar.instance:
+ self.infobar = InfoBar.instance
+ else:
+ self.infobar = self.session.infobar
+#
self.fillList()
self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
if self.infobar.selected_subtitle != subtitles:
self.infobar.subtitles_enabled = False
self.infobar.selected_subtitle = subtitles
- self.infobar.subtitles_enabled = True
-
- def disableSubtitles(self):
- self.infobar.subtitles_enabled = False
+ if subtitles:
+ self.infobar.subtitles_enabled = True
def keyLeft(self):
ConfigListScreen.keyLeft(self)