mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Fix bug where sonos app cannot navigate from track to artist when subsonic returns null artistId on song (#79)
This commit is contained in:
@@ -25,7 +25,7 @@ export type AuthFailure = {
|
||||
};
|
||||
|
||||
export type ArtistSummary = {
|
||||
id: string;
|
||||
id: string | undefined;
|
||||
name: string;
|
||||
image: BUrn | undefined;
|
||||
};
|
||||
|
||||
@@ -312,10 +312,10 @@ export const track = (bonobUrl: URLBuilder, track: Track) => ({
|
||||
album: track.album.name,
|
||||
albumId: `album:${track.album.id}`,
|
||||
albumArtist: track.artist.name,
|
||||
albumArtistId: `artist:${track.artist.id}`,
|
||||
albumArtistId: track.artist.id? `artist:${track.artist.id}` : undefined,
|
||||
albumArtURI: defaultAlbumArtURI(bonobUrl, track).href(),
|
||||
artist: track.artist.name,
|
||||
artistId: `artist:${track.artist.id}`,
|
||||
artistId: track.artist.id ? `artist:${track.artist.id}` : undefined,
|
||||
duration: track.duration,
|
||||
genre: track.album.genre?.name,
|
||||
genreId: track.album.genre?.id,
|
||||
|
||||
@@ -144,12 +144,14 @@ type GetArtistResponse = SubsonicResponse & {
|
||||
};
|
||||
};
|
||||
|
||||
type song = {
|
||||
export type song = {
|
||||
id: string;
|
||||
parent: string | undefined;
|
||||
title: string;
|
||||
album: string | undefined;
|
||||
albumId: string | undefined;
|
||||
artist: string | undefined;
|
||||
artistId: string | undefined;
|
||||
track: number | undefined;
|
||||
year: string | undefined;
|
||||
genre: string | undefined;
|
||||
@@ -159,8 +161,6 @@ type song = {
|
||||
bitRate: number | undefined;
|
||||
suffix: string | undefined;
|
||||
contentType: string | undefined;
|
||||
albumId: string | undefined;
|
||||
artistId: string | undefined;
|
||||
type: string | undefined;
|
||||
userRating: number | undefined;
|
||||
starred: string | undefined;
|
||||
@@ -270,9 +270,9 @@ export const asTrack = (album: Album, song: song): Track => ({
|
||||
coverArt: coverArtURN(song.coverArt),
|
||||
album,
|
||||
artist: {
|
||||
id: `${song.artistId!}`,
|
||||
name: song.artist!,
|
||||
image: artistImageURN({ artistId: song.artistId }),
|
||||
id: song.artistId,
|
||||
name: song.artist ? song.artist : "?",
|
||||
image: song.artistId ? artistImageURN({ artistId: song.artistId }) : undefined,
|
||||
},
|
||||
rating: {
|
||||
love: song.starred != undefined,
|
||||
|
||||
Reference in New Issue
Block a user