From 5a626462406c008da1c81cf304a448d9abd19576 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Thu, 20 Nov 2008 12:17:28 +0100 Subject: decode id3 cover art images embedded into mp3 files and show them in mediaplayer --- lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/python/Plugins/Extensions') diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 8477ecc1..b6d87a6e 100644 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -82,10 +82,10 @@ class MediaPixmap(Pixmap): def showDefaultCover(self): self.instance.setPixmap(self.noCoverPixmap) - #def destroy(self): - #Pixmap.destroy(self) - #print "mediapixmap ***********+ destroy" - + def embeddedCoverArt(self): + print "[embeddedCoverArt] found" + self.coverArtFileName = "/tmp/.id3coverart" + self.picload.startDecode(self.coverArtFileName) class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSupport, InfoBarNotifications, InfoBarSubtitleSupport, HelpableScreen): ALLOW_SUSPEND = True @@ -224,7 +224,8 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB { iPlayableService.evUpdatedInfo: self.__evUpdatedInfo, iPlayableService.evUser+11: self.__evDecodeError, - iPlayableService.evUser+12: self.__evPluginError + iPlayableService.evUser+12: self.__evPluginError, + iPlayableService.evUser+13: self["coverArt"].embeddedCoverArt }) def doNothing(self): -- cgit v1.2.3