small cleanup
authorghost <andreas.monzner@multimedia-labs.de>
Thu, 4 Dec 2008 12:10:32 +0000 (13:10 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Thu, 4 Dec 2008 12:10:32 +0000 (13:10 +0100)
lib/python/Plugins/Extensions/MediaPlayer/plugin.py

index c25af780bfc58eb602e7c78644af3cfab0344d6d..545f5f238e073913247946ee36056ad82b6ef202 100644 (file)
@@ -818,9 +818,10 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                                text = self.getIdentifier(currref)
                                text = ">"+text
                                ext = text[-4:].lower()
+                               audio_extensions = (".mp2", ".mp3", ".wav", ".ogg", "flac", "m4a")
 
                                # FIXME: the information if the service contains video (and we should hide our window) should com from the service instead 
-                               if ext not in [".mp2", ".mp3", ".wav", ".ogg", "flac"] and not self.isAudioCD:
+                               if ext not in audio_extensions and not self.isAudioCD:
                                        self.hide()
                                else:
                                        needsInfoUpdate = True
@@ -847,7 +848,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                                currref = self.playlist.getServiceRefList()[idx]
                                text = currref.getPath()
                                ext = text[-4:].lower()
-                               if ext not in [".mp2", ".mp3", ".wav", ".ogg", "flac"] and not self.isAudioCD:
+                               if ext not in audio_extensions and not self.isAudioCD:
                                        self.hide()
                                else:
                                        needsInfoUpdate = True