add bit depth, sample rate

This commit is contained in:
Kendall Garner
2025-07-13 07:12:13 -07:00
parent 8b141d652c
commit 4b4df28641
8 changed files with 65 additions and 16 deletions
@@ -148,6 +148,7 @@ const normalizeSong = (
albumId: item.albumId,
...getArtists(item),
artistName: item.artist,
bitDepth: item.bitDepth || null,
bitRate: item.bitRate,
bpm: item.bpm ? item.bpm : null,
channels: item.channels ? item.channels : null,
@@ -189,6 +190,7 @@ const normalizeSong = (
: new Date(Date.UTC(item.year, 0, 1))
).toISOString(),
releaseYear: String(item.year),
sampleRate: item.sampleRate || null,
serverId: server?.id || 'unknown',
serverType: ServerType.NAVIDROME,
size: item.size,
@@ -184,6 +184,7 @@ const song = z.object({
albumId: z.string(),
artist: z.string(),
artistId: z.string(),
bitDepth: z.number().optional(),
bitRate: z.number(),
bookmarkPosition: z.number(),
bpm: z.number().optional(),
@@ -226,6 +227,7 @@ const song = z.object({
rgAlbumPeak: z.number().optional(),
rgTrackGain: z.number().optional(),
rgTrackPeak: z.number().optional(),
sampleRate: z.number(),
size: z.number(),
smallImageUrl: z.string().optional(),
sortAlbumArtistName: z.string(),