mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Add additional song types
This commit is contained in:
parent
e94783820e
commit
d1c038ea6f
4 changed files with 26 additions and 3 deletions
|
|
@ -572,6 +572,8 @@ const normalizeSong = (
|
|||
artistName: item.ArtistItems[0]?.Name,
|
||||
artists: item.ArtistItems.map((entry) => ({ id: entry.Id, name: entry.Name })),
|
||||
bitRate: item.MediaSources && Number(Math.trunc(item.MediaSources[0]?.Bitrate / 1000)),
|
||||
bpm: null,
|
||||
channels: null,
|
||||
compilation: null,
|
||||
container: (item.MediaSources && item.MediaSources[0]?.Container) || null,
|
||||
createdAt: item.DateCreated,
|
||||
|
|
@ -581,10 +583,13 @@ const normalizeSong = (
|
|||
id: item.Id,
|
||||
imageUrl: getSongCoverArtUrl({ baseUrl: server.url, item, size: imageSize || 300 }),
|
||||
isFavorite: (item.UserData && item.UserData.IsFavorite) || false,
|
||||
lastPlayedAt: null,
|
||||
name: item.Name,
|
||||
note: null,
|
||||
path: (item.MediaSources && item.MediaSources[0]?.Path) || null,
|
||||
playCount: (item.UserData && item.UserData.PlayCount) || 0,
|
||||
releaseDate: (item.ProductionYear && new Date(item.ProductionYear, 0, 1).toISOString()) || null,
|
||||
// releaseDate: (item.ProductionYear && new Date(item.ProductionYear, 0, 1).toISOString()) || null,
|
||||
releaseDate: null,
|
||||
releaseYear: (item.ProductionYear && String(item.ProductionYear)) || null,
|
||||
serverId: server.id,
|
||||
size: item.MediaSources && item.MediaSources[0]?.Size,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue