add audioselection
authorRonny Strutz <ronny.strutz@multimedia-labs.de>
Mon, 14 Nov 2005 22:50:10 +0000 (22:50 +0000)
committerRonny Strutz <ronny.strutz@multimedia-labs.de>
Mon, 14 Nov 2005 22:50:10 +0000 (22:50 +0000)
data/skin.xml
lib/python/Screens/AudioSelection.py [new file with mode: 0644]
lib/python/Screens/Makefile.am
lib/python/Screens/__init__.py

index 52c9bb5..70b08b3 100644 (file)
@@ -42,6 +42,9 @@
                <screen name="ServiceInfo" position="180,120" size="360,330">
                        <widget name="infolist" position="20,10" size="320,325" />
                </screen>
+               <screen name="AudioSelection" position="210,150" size="300,170">
+                       <widget name="tracks" position="20,10" size="260,150" />
+               </screen>
                <screen name="HarddiskSelection" position="140,165" size="360,100">
                        <widget name="hddlist" position="20,10" size="320,75" />
                </screen>
diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py
new file mode 100644 (file)
index 0000000..a3700ce
--- /dev/null
@@ -0,0 +1,27 @@
+from Screen import Screen
+from Components.ActionMap import ActionMap
+from Components.MenuList import MenuList
+from Components.Label import Label
+
+class AudioSelection(Screen):
+       def __init__(self, session, audio):
+               Screen.__init__(self, session)
+
+               self["actions"] = ActionMap(["SetupActions"], 
+                       {
+                               "cancel": self.close,
+                               "ok": self.close,
+                       })
+
+               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
index 3e4e3c0..1999c41 100644 (file)
@@ -5,4 +5,5 @@ install_PYTHON = \
        MessageBox.py ScartLoopThrough.py Screen.py ServiceScan.py TimerEdit.py \
        MovieSelection.py Setup.py About.py HarddiskSetup.py FixedMenu.py \
        Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py \
-       EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py __init__.py
+       EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \
+       AudioSelection.py __init__.py
index 8a9c2bc..cb25be4 100644 (file)
@@ -3,4 +3,5 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu",
        "ScartLoopThrough", "Screen", "ServiceScan", "About",
        "TimerEdit", "Setup", "HarddiskSetup", "FixedMenu",
        "Satconfig", "Scanconfig", "Ci.py", "Volume.py", "Mute.py",
-       "EpgSelection", "EventView", "Standby", "ServiceInfo"]
+       "EpgSelection", "EventView", "Standby", "ServiceInfo",
+       "AudioSelection"]