+ def infoTimerFire(self):
+ currPlay = self.session.nav.getCurrentService()
+ if currPlay is not None:
+ self.updateMusicInformation( artist = currPlay.info().getInfoString(iServiceInformation.sArtist),
+ title = currPlay.info().getInfoString(iServiceInformation.sTitle),
+ album = currPlay.info().getInfoString(iServiceInformation.sAlbum),
+ genre = currPlay.info().getInfoString(iServiceInformation.sGenre),
+ clear = True)
+ else:
+ self.updateMusicInformation()
+
+ def updateMusicInformation(self, artist = "", title = "", album = "", year = "", genre = "", clear = False):
+ self.updateSingleMusicInformation("artist", artist, clear)
+ self.updateSingleMusicInformation("title", title, clear)
+ self.updateSingleMusicInformation("album", album, clear)
+ self.updateSingleMusicInformation("year", year, clear)
+ self.updateSingleMusicInformation("genre", genre, clear)
+
+ def updateSingleMusicInformation(self, name, info, clear):
+ if info != "" or clear:
+ if self[name].getText() != info:
+ self[name].setText(info)