Enigma2-Plugins-{GraphMultiEPG/GraphMultiEpg.py, MediaPlayer/plugin.py, SoftwareManag...
[enigma2.git] / lib / python / Plugins / Extensions / MediaPlayer / plugin.py
old mode 100644 (file)
new mode 100755 (executable)
index c535e1b..a2422be
@@ -19,7 +19,7 @@ from Components.Playlist import PlaylistIOInternal, PlaylistIOM3U, PlaylistIOPLS
 from Components.AVSwitch import AVSwitch
 from Components.Harddisk import harddiskmanager
 from Components.config import config
-from Tools.Directories import fileExists, pathExists, resolveFilename, SCOPE_CONFIG, SCOPE_PLAYLIST, SCOPE_SKIN_IMAGE
+from Tools.Directories import fileExists, pathExists, resolveFilename, SCOPE_CONFIG, SCOPE_PLAYLIST, SCOPE_CURRENT_SKIN
 from settings import MediaPlayerSettings
 import random
 
@@ -50,7 +50,7 @@ class MediaPixmap(Pixmap):
                                        noCoverFile = value
                                        break
                if noCoverFile is None:
-                       noCoverFile = resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/no_coverArt.png")
+                       noCoverFile = resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/no_coverArt.png")
                self.noCoverPixmap = LoadPixmap(noCoverFile)
                return Pixmap.applySkin(self, desktop, screen)
 
@@ -241,7 +241,10 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                for x in self.playlist.list:
                        self.playlistIOInternal.addService(ServiceReference(x[0]))
                if self.savePlaylistOnExit:
-                       self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls"))
+                       try:
+                               self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls"))
+                       except IOError:
+                               print "couldn't save playlist.e2pls"
                if config.mediaplayer.saveDirOnExit.getValue():
                        config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory())
                        config.mediaplayer.defaultDir.save()