audio selection - fake
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 14 Nov 2005 21:49:09 +0000 (21:49 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 14 Nov 2005 21:49:09 +0000 (21:49 +0000)
data/keymap.xml
lib/python/Screens/InfoBar.py

index 5994996..8240790 100644 (file)
@@ -54,7 +54,7 @@
 <!--           <key id="r" mapto="instantRecord" flags="m" /> -->
                <key id="r" mapto="showEPGList" flags="m" />
                <key id="KEY_INFO" mapto="showEPGList" flags="m" />
-               <key id="KEY_RED" mapto="instantRecord" flags="m" />
+<!--           <key id="KEY_RED" mapto="instantRecord" flags="m" /> -->
                <key id="1" mapto="zapUp" flags="mr" />
                <key id="2" mapto="zapDown" flags="mr" />
                <key id="KEY_M" mapto="mainMenu" flags="mr" />
@@ -68,6 +68,7 @@
                <key id="KEY_OK" mapto="toggleShow" flags="m" />
                <key id="KEY_EXIT" mapto="hide" flags="m" />
                <key id="KEY_VIDEO" mapto="showMovies" flags="m" />
+               <key id="KEY_AUDIO" mapto="audioSelection" flags="m" />
                <key id="KEY_VOLUMEUP" mapto="volumeUp" flags="mr" />
                <key id="KEY_VOLUMEDOWN" mapto="volumeDown" flags="mr" />
                <key id="KEY_MUTE" mapto="volumeMute" flags="mr" />
@@ -86,6 +87,9 @@
                
                <key id="KEY_YELLOW" mapto="pauseService" flags="m" />
                <key id="KEY_GREEN" mapto="unPauseService" flags="m" />
+               
+               <key id="KEY_RED" mapto="seekBack" flags="m" />
+               <key id="KEY_BLUE" mapto="seekFwd" flags="m" />
        </map>
        
        <map context="ChannelSelectActions">
index 6615d6f..9076942 100644 (file)
@@ -132,6 +132,8 @@ class InfoBar(Screen):
                                
                                "seekFwd": self.seekFwd,
                                "seekBack": self.seekBack,
+                               
+                               "audioSelection": self.audioSelection,
                        })
 #              self["okbutton"] = Button("mainMenu", [self.mainMenu])
                
@@ -259,7 +261,7 @@ class InfoBar(Screen):
        def quit(self):
                #       self.session.open(Standby, self)
                configfile.save()
-               quitMainloop()
+               quitMainloop(0)
        
        def stopCurrentRecording(self): 
                print "remove entry"
@@ -321,3 +323,12 @@ class InfoBar(Screen):
        
        def seekBack(self):
                self.doSeek(-1, 10000)
+
+       def audioSelection(self):
+               service = self.session.nav.getCurrentService()
+               audio = service.audioTracks()
+               n = audio.getNumberOfTracks()
+               print "AUDIO TRACKS:"
+               for x in range(n):
+                       i = audio.getTrackInfo(x)
+                       print i.getDescription()