fixes
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 18 Sep 2008 11:14:06 +0000 (11:14 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 18 Sep 2008 11:14:06 +0000 (11:14 +0000)
lib/python/Plugins/Extensions/DVDPlayer/plugin.py

index 0d1f65f..7159a6c 100644 (file)
@@ -429,22 +429,24 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
        def __osdAudioInfoAvail(self):
                audioTuple = self.service.info().getInfoObject(iServiceInformation.sUser+6)
                print "AudioInfoAvail ", repr(audioTuple)
-               audioString = "%d: %s (%s)" % (audioTuple[0],audioTuple[1],audioTuple[2])
-               self["audioLabel"].setText(audioString)
-               if audioTuple != self.last_audioTuple and not self.in_menu:
-                       self.doShow()
-               self.last_audioTuple = audioTuple
+               if audioTuple:
+                       audioString = "%d: %s (%s)" % (audioTuple[0],audioTuple[1],audioTuple[2])
+                       self["audioLabel"].setText(audioString)
+                       if audioTuple != self.last_audioTuple and not self.in_menu:
+                               self.doShow()
+                       self.last_audioTuple = audioTuple
 
        def __osdSubtitleInfoAvail(self):
                subtitleTuple = self.service.info().getInfoObject(iServiceInformation.sUser+7)
                print "SubtitleInfoAvail ", repr(subtitleTuple)
-               subtitleString = ""
-               if subtitleTuple[0] is not 0:
-                       subtitleString = "%d: %s" % (subtitleTuple[0],subtitleTuple[1])
-               self["subtitleLabel"].setText(subtitleString)
-               if subtitleTuple != self.last_subtitleTuple and not self.in_menu:
-                       self.doShow()
-               self.last_subtitleTuple = subtitleTuple
+               if subtitleTuple:
+                       subtitleString = ""
+                       if subtitleTuple[0] is not 0:
+                               subtitleString = "%d: %s" % (subtitleTuple[0],subtitleTuple[1])
+                       self["subtitleLabel"].setText(subtitleString)
+                       if subtitleTuple != self.last_subtitleTuple and not self.in_menu:
+                               self.doShow()
+                       self.last_subtitleTuple = subtitleTuple
 
        def __chapterUpdated(self):
                self.currentChapter = self.service.info().getInfo(iServiceInformation.sCurrentChapter)