song.label has been changed at some point to be the full text in the
playlist and not just the song title, grab the song title and use it
if available, falling back to the playlist label if needed.
-SONG_PROPERTIES = ['album', 'artist', 'albumartist', 'dateadded', 'userrating', 'displayartist']
+SONG_PROPERTIES = ['album', 'artist', 'albumartist', 'title', 'dateadded', 'userrating', 'displayartist']
PAGE_SELF = os.environ['SCRIPT_NAME'] if 'SCRIPT_NAME' in os.environ else ''
class Song:
PAGE_SELF = os.environ['SCRIPT_NAME'] if 'SCRIPT_NAME' in os.environ else ''
class Song:
else:
self.rating = -1 # might be better to use None here
else:
self.rating = -1 # might be better to use None here
- self.label = song['label']
+ if 'title' in song and len(song['title']) > 0:
+ self.label = song['title']
+ else:
+ self.label = song['label']
def songs(items):
'''Convert list of Kodi Items into Song instances'''
def songs(items):
'''Convert list of Kodi Items into Song instances'''