Workaround when no sortable title available
This commit is contained in:
parent
0e4f8c10c7
commit
7c13750b4a
|
@ -107,7 +107,7 @@ class PysonicApi(object):
|
||||||
if type == "random":
|
if type == "random":
|
||||||
shuffle(albums)
|
shuffle(albums)
|
||||||
elif type == "alphabeticalByName":
|
elif type == "alphabeticalByName":
|
||||||
albums.sort(key=lambda item: item.get("id3_album", item["album"]))
|
albums.sort(key=lambda item: item.get("id3_album", item["album"] if item["album"] else "zzzzzUnsortable"))
|
||||||
else:
|
else:
|
||||||
raise NotImplemented()
|
raise NotImplemented()
|
||||||
albumset = albums[0 + int(offset):int(size) + int(offset)]
|
albumset = albums[0 + int(offset):int(size) + int(offset)]
|
||||||
|
|
Loading…
Reference in New Issue