add audioselection
[enigma2.git] / lib / python / Screens / AudioSelection.py
1 from Screen import Screen
2 from Components.ActionMap import ActionMap
3 from Components.MenuList import MenuList
4 from Components.Label import Label
5
6 class AudioSelection(Screen):
7         def __init__(self, session, audio):
8                 Screen.__init__(self, session)
9
10                 self["actions"] = ActionMap(["SetupActions"], 
11                         {
12                                 "cancel": self.close,
13                                 "ok": self.close,
14                         })
15
16                 tlist = []
17
18                 n = audio.getNumberOfTracks()
19                 print "AUDIO TRACKS:"
20                 for x in range(n):
21                         i = audio.getTrackInfo(x)
22                         print i.getDescription()
23                         tlist.append((i.getDescription(), x))
24
25                 self["tracks"] = MenuList(tlist)
26                 #self["tracks"] = Label("Blasel")
27