mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
better album dates
This commit is contained in:
parent
8c929d0dc3
commit
9923c021fa
7 changed files with 52 additions and 13 deletions
|
|
@ -175,8 +175,11 @@ const normalizeSong = (
|
|||
peak: null,
|
||||
playCount: (item.UserData && item.UserData.PlayCount) || 0,
|
||||
playlistItemId: item.PlaylistItemId,
|
||||
// releaseDate: (item.ProductionYear && new Date(item.ProductionYear, 0, 1).toISOString()) || null,
|
||||
releaseDate: null,
|
||||
releaseDate: item.PremiereDate
|
||||
? new Date(item.PremiereDate).toISOString()
|
||||
: item.ProductionYear
|
||||
? new Date(item.ProductionYear, 0, 1).toISOString()
|
||||
: null,
|
||||
releaseYear: item.ProductionYear ? String(item.ProductionYear) : null,
|
||||
serverId: server?.id || '',
|
||||
serverType: ServerType.JELLYFIN,
|
||||
|
|
@ -237,6 +240,7 @@ const normalizeAlbum = (
|
|||
lastPlayedAt: null,
|
||||
mbzId: item.ProviderIds?.MusicBrainzAlbum || null,
|
||||
name: item.Name,
|
||||
originalDate: null,
|
||||
playCount: item.UserData?.PlayCount || 0,
|
||||
releaseDate: item.PremiereDate?.split('T')[0] || null,
|
||||
releaseYear: item.ProductionYear || null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue