Merge branch 'vuplus_experimental' of code.vuplus.com:/opt/repository/dvbapp into...
authorkos <kos@dev3>
Tue, 15 Jan 2013 01:50:03 +0000 (10:50 +0900)
committerkos <kos@dev3>
Tue, 15 Jan 2013 01:50:03 +0000 (10:50 +0900)
1  2 
lib/python/Plugins/Extensions/MediaPlayer/plugin.py

@@@ -110,7 -110,7 +110,7 @@@ class MediaPlayer(Screen, InfoBarBase, 
  
                # 'None' is magic to start at the list of mountpoints
                defaultDir = config.mediaplayer.defaultDir.getValue()
-               self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov|m2ts|flv)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls")
+               self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov|m2ts|flv|dts|3gp|3g2|mts)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls")
                self["filelist"] = self.filelist
  
                self.playlist = MyPlayList()
        
        def playEntry(self):
                if len(self.playlist.getServiceRefList()):
 -                      audio_extensions = (".mp2", ".mp3", ".wav", ".ogg", "flac", "m4a")
 +                      audio_extensions = (".mp2", ".mp3", ".wav", ".ogg", ".flac", ".m4a", ".dts")
                        needsInfoUpdate = False
                        currref = self.playlist.getServiceRefList()[self.playlist.getCurrentIndex()]
                        if self.session.nav.getCurrentlyPlayingServiceReference() is None or currref != self.session.nav.getCurrentlyPlayingServiceReference():
                                currref = self.playlist.getServiceRefList()[idx]
                                text = self.getIdentifier(currref)
                                text = ">"+text
 -                              ext = text[-4:].lower()
 +                              try:
 +                                      import os
 +                                      nameext = os.path.splitext(text)
 +                                      ext = nameext[1]
 +                              except: ext = text[-4:].lower()
  
                                # FIXME: the information if the service contains video (and we should hide our window) should com from the service instead 
                                if ext not in audio_extensions and not self.isAudioCD: