def _get_tags( self ):
# get track tags
artist = self.getMusicInfoTag().getArtist()
album = self.getMusicInfoTag().getAlbum()
title = self.getMusicInfoTag().getTitle()
duration = str(self.getMusicInfoTag().getDuration())
# get duration from xbmc.Player if the MusicInfoTag duration is invalid
if int(duration) <= 0:
duration = str(int(self.getTotalTime()))
track = str(self.getMusicInfoTag().getTrack())
mbid = '' # musicbrainz id is not available
comment = self.getMusicInfoTag().getComment()
path = self.getPlayingFile()
timestamp = int(time.time())
source = 'P'
# streaming radio of provides both artistname and songtitle as one label
if title and not artist:
try:
artist = title.split(' - ')[0]
title = title.split(' - ')[1]
except:
pass
tracktags = [artist, album, title, duration, track, mbid, comment, path, timestamp, source]
log('#DEBUG# tracktags: %s' % tracktags)
return tracktags
评论列表
文章目录