add validation for Subsonic releaseDate

This commit is contained in:
jeffvli
2025-12-13 19:47:07 -08:00
parent 401d0e5c19
commit 5c8d18d1c9
@@ -280,7 +280,11 @@ const normalizeAlbum = (
participants: getParticipants(item), participants: getParticipants(item),
playCount: null, playCount: null,
recordLabels: item.recordLabels?.map((item) => item.name) || [], recordLabels: item.recordLabels?.map((item) => item.name) || [],
releaseDate: item.releaseDate releaseDate:
item.releaseDate &&
typeof item.releaseDate.year === 'number' &&
typeof item.releaseDate.month === 'number' &&
typeof item.releaseDate.day === 'number'
? new Date( ? new Date(
item.releaseDate.year, item.releaseDate.year,
item.releaseDate.month - 1, item.releaseDate.month - 1,