decode id3 cover art images embedded into mp3 files and show them in mediaplayer
[enigma2.git] / lib / python / Plugins / Extensions / MediaPlayer / plugin.py
index 8477ecc17cfa2b962511c2991e0189e8a7ee2110..b6d87a6e73a1018814fa9a31a831eca5a02753f1 100644 (file)
@@ -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):