feat(ui): add smooth image transitions to album and artist artwork (#4120)
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -61,18 +61,12 @@ const getCoverArtUrl = (record, size, square) => {
|
||||
...(square && { square }),
|
||||
}
|
||||
|
||||
// For playlists, add a timestamp to prevent caching issues when switching between playlists
|
||||
if (record.songCount !== undefined) {
|
||||
// Add current timestamp to ensure fresh requests for playlists
|
||||
options._ = record.updatedAt || new Date().getTime()
|
||||
}
|
||||
|
||||
// TODO Move this logic to server. `song` and `album` should have a CoverArtID
|
||||
// TODO Move this logic to server
|
||||
if (record.album) {
|
||||
return baseUrl(url('getCoverArt', 'mf-' + record.id, options))
|
||||
} else if (record.albumArtist) {
|
||||
return baseUrl(url('getCoverArt', 'al-' + record.id, options))
|
||||
} else if (record.songCount !== undefined) {
|
||||
} else if (record.sync !== undefined) {
|
||||
// This is a playlist
|
||||
return baseUrl(url('getCoverArt', 'pl-' + record.id, options))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user