fix(jellyfin): fix jellyfin media metadata (#250)

This commit is contained in:
sudacode authored and GitHub committed 2026-09-18 00:24:25 -07:00
1 parent 2831e05124
commit 186d4a0640
29 files changed
+594 -31

No files matched your search

@@ -147,6 +147,25 @@ test('getLocalVideoMetadata derives title and falls back to null hash on read er
assert.equal(hashFallbackMetadata.hashSha256, null);
});
test('stream stats parsing preserves display titles and never persists transport credentials', async () => {
const targets: string[] = [];
const parsed = await guessAnimeVideoMetadata(
'https://jellyfin.example/Videos/item/stream?api_key=test-secret',
'Fate/stay night S01E02',
{
runGuessit: async (target) => {
targets.push(target);
return JSON.stringify({ title: 'Fate/stay night', season: 1, episode: 2 });
},
},
);
assert.deepEqual(targets, ['Fate/stay night S01E02']);
assert.equal(parsed?.parsedBasename, 'Fate/stay night S01E02');
assert.equal(parsed?.parsedTitle, 'Fate/stay night');
assert.equal(JSON.stringify(parsed).includes('test-secret'), false);
assert.equal(JSON.stringify(parsed).includes('/stream'), false);
});
test('guessAnimeVideoMetadata uses guessit basename output first when available', async () => {
const seenTargets: string[] = [];
const parsed = await guessAnimeVideoMetadata(