Load artwork from embedded
This commit is contained in:
@@ -37,7 +37,7 @@ const mapToAudioLists = (item) => {
|
||||
musicSrc: subsonic.streamUrl(trackId),
|
||||
cover: subsonic.getCoverArtUrl(
|
||||
{
|
||||
coverArtId: config.devFastAccessCoverArt ? item.albumId : trackId,
|
||||
id: config.devFastAccessCoverArt ? item.albumId : trackId,
|
||||
updatedAt: item.updatedAt,
|
||||
},
|
||||
300
|
||||
|
||||
@@ -51,10 +51,14 @@ const getCoverArtUrl = (record, size) => {
|
||||
...(size && { size }),
|
||||
}
|
||||
|
||||
if (record.coverArtId) {
|
||||
return baseUrl(url('getCoverArt', record.coverArtId, options))
|
||||
const lastUpdate = Math.floor(Date.parse(record.updatedAt) / 1000).toString(
|
||||
16
|
||||
)
|
||||
const id = record.id + '-' + lastUpdate
|
||||
if (record.album) {
|
||||
return baseUrl(url('getCoverArt', 'mf-' + id, options))
|
||||
} else {
|
||||
return baseUrl(url('getCoverArt', 'not_found', size && { size }))
|
||||
return baseUrl(url('getCoverArt', 'al-' + id, options))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user