aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-10-22 18:29:04 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-10-22 18:29:04 +0000
commite0d2999e8b856bb5b6c984447bf0c213a49a1e31 (patch)
treeed41715388c803216c93bac0ccd0bcc93b757b33 /lib/python/Plugins/Extensions/MediaPlayer/plugin.py
parent69d3f11e4bf566bc12981447c2b8cb999177b007 (diff)
downloadenigma2-e0d2999e8b856bb5b6c984447bf0c213a49a1e31.tar.gz
enigma2-e0d2999e8b856bb5b6c984447bf0c213a49a1e31.zip
use coverart png given in skin
Diffstat (limited to 'lib/python/Plugins/Extensions/MediaPlayer/plugin.py')
-rw-r--r--lib/python/Plugins/Extensions/MediaPlayer/plugin.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
index 629e9684..3783ddd4 100644
--- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
@@ -30,6 +30,17 @@ class MyPlayList(PlayList):
self.currPlaying = -1
self.oldCurrPlaying = -1
+class MediaPixmap(Pixmap):
+ def applySkin(self, desktop):
+ self.default_pixmap = None
+ for (attrib, value) in self.skinAttributes:
+ if attrib == "pixmap":
+ self.default_pixmap = value
+ break
+ if self.default_pixmap is None:
+ self.default_pixmap = resolveFilename(SCOPE_SKIN_IMAGE, "no_coverArt.png")
+ return Pixmap.applySkin(self, desktop)
+
class MediaPlayer(Screen, InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSupport, InfoBarNotifications, HelpableScreen):
ALLOW_SUSPEND = True
ENABLE_RESUME_SUPPORT = True
@@ -73,7 +84,7 @@ class MediaPlayer(Screen, InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSup
self["year"] = Label("")
self["genretext"] = Label(_("Genre:"))
self["genre"] = Label("")
- self["coverArt"] = Pixmap()
+ self["coverArt"] = MediaPixmap()
self.seek_target = None
@@ -237,7 +248,7 @@ class MediaPlayer(Screen, InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSup
path = os_path.dirname(filename)
pngname = path + "/" + "folder.png"
if not os_path.exists(pngname):
- pngname = resolveFilename(SCOPE_SKIN_IMAGE, "no_coverArt.png")
+ pngname = self["coverArt"].default_pixmap
if self.coverArtFileName != pngname:
self.coverArtFileName = pngname
self["coverArt"].instance.setPixmapFromFile(self.coverArtFileName)