self["genre"] = Label("")
#self["text"] = Input("1234", maxSize=True, type=Input.NUMBER)
-
- self["actions"] = NumberActionMap(["OkCancelActions", "DirectionActions", "NumberActions", "MediaPlayerSeekActions"],
+
+ class MoviePlayerActionMap(NumberActionMap):
+ def __init__(self, player, contexts = [ ], actions = { }, prio=0):
+ NumberActionMap.__init__(self, contexts, actions, prio)
+ self.player = player
+
+ def action(self, contexts, action):
+ self.player.show()
+ return NumberActionMap.action(self, contexts, action)
+
+ self["actions"] = MoviePlayerActionMap(self, ["OkCancelActions", "DirectionActions", "NumberActions", "MediaPlayerSeekActions"],
{
"ok": self.ok,
"cancel": self.exit,
menu.append((_("switch to filelist"), "filelist"))
menu.append((_("delete"), "delete"))
menu.append((_("clear playlist"), "clear"))
+ menu.append((_("hide player"), "hide"));
self.session.openWithCallback(self.menuCallback, ChoiceBox, title="", list=menu)
def menuCallback(self, choice):
elif choice[1] == "filelist":
self.switchToFileList()
elif choice[1] == "delete":
+ if self.playlist.getSelectionIndex() == self.playlist.getCurrentIndex():
+ self.stopEntry()
self.deleteEntry()
elif choice[1] == "clear":
self.stopEntry()
self.playlist.clear()
self.switchToFileList()
-
+ elif choice[1] == "hide":
+ self.hide()
+
def copyDirectory(self, directory):
filelist = FileList(directory, useServiceRef = True, isTop = True)
def stopEntry(self):
self.playlist.stopFile()
self.session.nav.playService(None)
+ self.updateMusicInformation(clear=True)