mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
funkwhale bodge
This commit is contained in:
parent
ecef9bea5e
commit
b3b810c62c
3 changed files with 27 additions and 20 deletions
|
|
@ -54,16 +54,16 @@ const normalizeSong = (
|
|||
album: item.album || '',
|
||||
albumArtists: [
|
||||
{
|
||||
id: item.artistId || '',
|
||||
id: item.artistId?.toString() || '',
|
||||
imageUrl: null,
|
||||
name: item.artist || '',
|
||||
},
|
||||
],
|
||||
albumId: item.albumId || '',
|
||||
albumId: item.albumId?.toString() || '',
|
||||
artistName: item.artist || '',
|
||||
artists: [
|
||||
{
|
||||
id: item.artistId || '',
|
||||
id: item.artistId?.toString() || '',
|
||||
imageUrl: null,
|
||||
name: item.artist || '',
|
||||
},
|
||||
|
|
@ -95,7 +95,7 @@ const normalizeSong = (
|
|||
},
|
||||
]
|
||||
: [],
|
||||
id: item.id,
|
||||
id: item.id.toString(),
|
||||
imagePlaceholderUrl: null,
|
||||
imageUrl,
|
||||
itemType: LibraryItem.SONG,
|
||||
|
|
@ -146,7 +146,7 @@ const normalizeAlbumArtist = (
|
|||
biography: null,
|
||||
duration: null,
|
||||
genres: [],
|
||||
id: item.id,
|
||||
id: item.id.toString(),
|
||||
imageUrl,
|
||||
itemType: LibraryItem.ALBUM_ARTIST,
|
||||
lastPlayedAt: null,
|
||||
|
|
@ -178,9 +178,11 @@ const normalizeAlbum = (
|
|||
return {
|
||||
albumArtist: item.artist,
|
||||
albumArtists: item.artistId
|
||||
? [{ id: item.artistId, imageUrl: null, name: item.artist }]
|
||||
? [{ id: item.artistId.toString(), imageUrl: null, name: item.artist }]
|
||||
: [],
|
||||
artists: item.artistId
|
||||
? [{ id: item.artistId.toString(), imageUrl: null, name: item.artist }]
|
||||
: [],
|
||||
artists: item.artistId ? [{ id: item.artistId, imageUrl: null, name: item.artist }] : [],
|
||||
backdropImageUrl: null,
|
||||
comment: null,
|
||||
createdAt: item.created,
|
||||
|
|
@ -195,7 +197,7 @@ const normalizeAlbum = (
|
|||
},
|
||||
]
|
||||
: [],
|
||||
id: item.id,
|
||||
id: item.id.toString(),
|
||||
imagePlaceholderUrl: null,
|
||||
imageUrl,
|
||||
isCompilation: null,
|
||||
|
|
@ -232,7 +234,7 @@ const normalizePlaylist = (
|
|||
description: item.comment || null,
|
||||
duration: item.duration,
|
||||
genres: [],
|
||||
id: item.id,
|
||||
id: item.id.toString(),
|
||||
imagePlaceholderUrl: null,
|
||||
imageUrl: getCoverArtUrl({
|
||||
baseUrl: server?.url,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue