diff options
| author | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-09-17 06:40:44 +0000 |
|---|---|---|
| committer | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-09-17 06:40:44 +0000 |
| commit | 8ecf68c28a4722e3c90b8c2c7a8e657baaecdce5 (patch) | |
| tree | 1a4cd1712d82ac888cabae4ecfbac41ba723dbbe /lib/python/Plugins/Extensions/MediaPlayer/plugin.py | |
| parent | 6687ebd26cfc1177aef6aca59f536655e2e07e03 (diff) | |
| download | enigma2-8ecf68c28a4722e3c90b8c2c7a8e657baaecdce5.tar.gz enigma2-8ecf68c28a4722e3c90b8c2c7a8e657baaecdce5.zip | |
change handling of non-mp2 hotplugged videos
Diffstat (limited to 'lib/python/Plugins/Extensions/MediaPlayer/plugin.py')
| -rw-r--r-- | lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index ab506590..b0384eab 100644 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -165,6 +165,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB self.coverArtFileName = "" self.isAudioCD = False self.AudioCD_albuminfo = {} + self.savePlaylistOnExit = False self.playlistIOInternal = PlaylistIOInternal() list = self.playlistIOInternal.open(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) @@ -192,7 +193,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB self.playlistIOInternal.clear() for x in self.playlist.list: self.playlistIOInternal.addService(ServiceReference(x[0])) - if not self.isAudioCD: + if self.savePlaylistOnExit: self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) self.close() @@ -781,19 +782,19 @@ def filescan_open(list, session, **kwargs): from enigma import eServiceReference mp = session.open(MediaPlayer) + mp.playlist.clear() + mp.savePlaylistOnExit = False - mp.switchToPlayList() for file in list: - if file.mimetype == "video/MP2T": + if file.mimetype.startswith("video"): stype = 1 else: stype = 4097 ref = eServiceReference(stype, 0, file.path) mp.playlist.addFile(ref) - # TODO: rather play first than last file? - mp.playServiceRefEntry(ref) - mp.playlist.updateList() + mp.changeEntry(0) + mp.switchToPlayList() def audioCD_open(list, session, **kwargs): from enigma import eServiceReference @@ -801,6 +802,7 @@ def audioCD_open(list, session, **kwargs): mp = session.open(MediaPlayer) mp.playlist.clear() + mp.savePlaylistOnExit = False mp.isAudioCD = True for file in list: |
