From f3060d26bbb98713b901794b6e47bf7f064a9073 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Fri, 28 Jan 2011 11:29:51 +0100 Subject: DVDPlayer: AudioSelection integration (#441) --- lib/python/Plugins/Extensions/DVDPlayer/keymap.xml | 3 ++- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 7 +++++-- lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml b/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml index 7b7f2054..bf57e753 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml +++ b/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml @@ -8,7 +8,8 @@ - + + diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index 259e52b8..d14a6238 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -356,6 +356,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP "prevTitle": (self.prevTitle, _("jump back to the previous title")), "tv": (self.askLeavePlayer, _("exit DVD player or return to file browser")), "dvdAudioMenu": (self.enterDVDAudioMenu, _("(show optional DVD audio menu)")), + "AudioSelection": (self.enterAudioSelection, _("Select audio track")), "nextAudioTrack": (self.nextAudioTrack, _("switch to the next audio track")), "nextSubtitleTrack": (self.nextSubtitleTrack, _("switch to the next subtitle language")), "nextAngle": (self.nextAngle, _("switch to the next angle")), @@ -548,6 +549,9 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP keys.keyPressed(key) return keys + def enterAudioSelection(self): + self.audioSelection() + def nextAudioTrack(self): self.sendKey(iServiceKeys.keyUser) @@ -555,8 +559,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.sendKey(iServiceKeys.keyUser+1) def enterDVDAudioMenu(self): - self.audioSelection() - #self.sendKey(iServiceKeys.keyUser+2) + self.sendKey(iServiceKeys.keyUser+2) def nextChapter(self): self.sendKey(iServiceKeys.keyUser+3) diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index b960ed67..ccacf3c0 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -685,7 +685,7 @@ RESULT eServiceDVD::enableSubtitles(eWidget *parent, ePyObject tuple) m_subtitle_widget = new eSubtitleWidget(parent); m_subtitle_widget->resize(parent->size()); - + int pid = -1; if ( tuple != Py_None ) @@ -702,6 +702,7 @@ RESULT eServiceDVD::enableSubtitles(eWidget *parent, ePyObject tuple) pid = PyInt_AsLong(entry)-1; ddvd_set_spu(m_ddvdconfig, pid); + m_event(this, evUser+7); } eDebug("eServiceDVD::enableSubtitles %i", pid); -- cgit v1.2.3