mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Account for playlist items in cover art url
This commit is contained in:
@@ -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 }],
|
||||
|
||||
Reference in New Issue
Block a user