Account for playlist items in cover art url
This commit is contained in:
parent
fecaa2e6b8
commit
d0e2a798fe
1 changed files with 14 additions and 14 deletions
|
@ -450,20 +450,6 @@ const normalizeSong = (
|
||||||
deviceId: string,
|
deviceId: string,
|
||||||
imageSize?: number,
|
imageSize?: number,
|
||||||
): Song => {
|
): Song => {
|
||||||
const imageUrl = getCoverArtUrl({
|
|
||||||
baseUrl: server.url,
|
|
||||||
coverArtId: item.id,
|
|
||||||
credential: server.credential,
|
|
||||||
size: imageSize || 300,
|
|
||||||
});
|
|
||||||
|
|
||||||
const imagePlaceholderUrl = getCoverArtUrl({
|
|
||||||
baseUrl: server.url,
|
|
||||||
coverArtId: item.albumId,
|
|
||||||
credential: server.credential,
|
|
||||||
size: 1,
|
|
||||||
});
|
|
||||||
|
|
||||||
let id;
|
let id;
|
||||||
|
|
||||||
// Dynamically determine the id field based on whether or not the item is a playlist song
|
// Dynamically determine the id field based on whether or not the item is a playlist song
|
||||||
|
@ -473,6 +459,20 @@ const normalizeSong = (
|
||||||
id = item.id;
|
id = item.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const imageUrl = getCoverArtUrl({
|
||||||
|
baseUrl: server.url,
|
||||||
|
coverArtId: id,
|
||||||
|
credential: server.credential,
|
||||||
|
size: imageSize || 300,
|
||||||
|
});
|
||||||
|
|
||||||
|
const imagePlaceholderUrl = getCoverArtUrl({
|
||||||
|
baseUrl: server.url,
|
||||||
|
coverArtId: id,
|
||||||
|
credential: server.credential,
|
||||||
|
size: 1,
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
album: item.album,
|
album: item.album,
|
||||||
albumArtists: [{ id: item.artistId, name: item.artist }],
|
albumArtists: [{ id: item.artistId, name: item.artist }],
|
||||||
|
|
Reference in a new issue