+ def onShow(self):
+ Pixmap.onShow(self)
+ sc = AVSwitch().getFramebufferScale()
+ #0=Width 1=Height 2=Aspect 3=use_cache 4=resize_type 5=Background(#AARRGGBB)
+ self.picload.setPara((self.instance.size().width(), self.instance.size().height(), sc[0], sc[1], False, 1, "#00000000"))
+
+ def paintCoverArtPixmapCB(self, picInfo=None):
+ ptr = self.picload.getData()
+ if ptr != None:
+ self.instance.setPixmap(ptr.__deref__())
+
+ def updateCoverArt(self, path):
+ while not path.endswith("/"):
+ path = path[:-1]
+ new_coverArtFileName = None
+ for filename in self.coverFileNames:
+ if fileExists(path + filename):
+ new_coverArtFileName = path + filename
+ if self.coverArtFileName != new_coverArtFileName:
+ self.coverArtFileName = new_coverArtFileName
+ if new_coverArtFileName:
+ self.picload.startDecode(self.coverArtFileName)
+ else:
+ self.showDefaultCover()
+
+ def showDefaultCover(self):
+ self.instance.setPixmap(self.noCoverPixmap)
+
+ def embeddedCoverArt(self):
+ print "[embeddedCoverArt] found"
+ self.coverArtFileName = "/tmp/.id3coverart"
+ self.picload.startDecode(self.coverArtFileName)
+