feat(jellyfin): allow Jellyfin Guids with dashes for import-from-jellyfin endpoint (#2340)

This commit is contained in:
Lachlan Wisdom
2026-03-02 22:22:33 +11:00
committed by GitHub
parent fece7537e4
commit 3557745b62
2 changed files with 30 additions and 4 deletions

15
server/utils/jellyfin.ts Normal file
View File

@@ -0,0 +1,15 @@
export function normalizeJellyfinGuid(
value: string | null | undefined
): string | null {
if (!value) {
return null;
}
const normalized = value.replace(/-/g, '').toLowerCase();
if (!/^[0-9a-f]{32}$/.test(normalized)) {
return null;
}
return normalized;
}