mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 06:27:09 +01:00
Account for playlist items in cover art url
This commit is contained in:
parent
fecaa2e6b8
commit
d0e2a798fe
@ -450,20 +450,6 @@ const normalizeSong = (
|
||||
deviceId: string,
|
||||
imageSize?: number,
|
||||
): 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;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
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 {
|
||||
album: item.album,
|
||||
albumArtists: [{ id: item.artistId, name: item.artist }],
|
||||
|
Loading…
Reference in New Issue
Block a user