Fix raw_album_to_ref_with_artist

This commit is contained in:
tjiho 2024-10-27 03:35:56 +01:00
parent 022d7e8f06
commit 3c38ed32f4

View file

@ -700,10 +700,12 @@ class SubsonicApi:
def raw_album_to_ref_with_artist(self, album): def raw_album_to_ref_with_artist(self, album):
if album is None: if album is None:
return None return None
album_name = album.get("title") or album.get("name") or UNKNOWN_ALBUM
artist = album.get("artist") or UNKNOWN_ARTIST
return Ref.album( return Ref.album(
name=album.get("artist") + " - " + album.get("title") name=artist + " · " + album_name,
or album.get("artist") + " - " + album.get("name")
or UNKNOWN_ALBUM,
uri=uri.get_album_uri(album.get("id")), uri=uri.get_album_uri(album.get("id")),
) )