aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/AudioSelection.py
diff options
context:
space:
mode:
authorRonny Strutz <ronny.strutz@multimedia-labs.de>2005-11-14 23:18:16 +0000
committerRonny Strutz <ronny.strutz@multimedia-labs.de>2005-11-14 23:18:16 +0000
commit58445511632b8e6c043e6bf7e5ef63630ecbc829 (patch)
tree00bb5cd30756c1f603a1dce7a72bbc7e8a375101 /lib/python/Screens/AudioSelection.py
parenteff0107a56d4deb2312ca92ab8a74dcffb03e594 (diff)
downloadenigma2-58445511632b8e6c043e6bf7e5ef63630ecbc829.tar.gz
enigma2-58445511632b8e6c043e6bf7e5ef63630ecbc829.zip
audioselection is working now
Diffstat (limited to 'lib/python/Screens/AudioSelection.py')
-rw-r--r--lib/python/Screens/AudioSelection.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py
index a3700ce8..6e3a288e 100644
--- a/lib/python/Screens/AudioSelection.py
+++ b/lib/python/Screens/AudioSelection.py
@@ -4,24 +4,28 @@ from Components.MenuList import MenuList
from Components.Label import Label
class AudioSelection(Screen):
+ def KeyOk(self):
+ selection = self["tracks"].getCurrent()
+ print "select track " + str(selection[1])
+ self.audio.selectTrack(selection[1])
+ self.close()
def __init__(self, session, audio):
Screen.__init__(self, session)
self["actions"] = ActionMap(["SetupActions"],
{
"cancel": self.close,
- "ok": self.close,
+ "ok": self.KeyOk,
})
- tlist = []
+ self.audio = audio
+ tlist = []
n = audio.getNumberOfTracks()
- print "AUDIO TRACKS:"
for x in range(n):
i = audio.getTrackInfo(x)
- print i.getDescription()
tlist.append((i.getDescription(), x))
self["tracks"] = MenuList(tlist)
- #self["tracks"] = Label("Blasel")
+
\ No newline at end of file