fix: parse tvshow.uniqueid tag as array in nfo parser

Fixes: #1749
This commit is contained in:
Christian Benincasa
2026-03-27 13:47:56 -04:00
parent 3af479008b
commit 89eb55c82c
2 changed files with 17 additions and 0 deletions

View File

@@ -57,4 +57,20 @@ describe('TvShowNfoParser', () => {
expect(output.tvshow.title).toBe('1024');
expect(output.tvshow.season).toBe(2);
});
test('parse nfo with single uniqueid tag', async () => {
const input = `
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<tvshow>
<title>다큐 인사이트</title>
<uniqueid type="tvdb" default="true">381143</uniqueid>
<genre>Documentary</genre>
</tvshow>
`;
const result = await new TvShowNfoParser().parse(input);
expect(result.isSuccess()).toBeTruthy();
expect(result.get().tvshow.uniqueid).toHaveLength(1);
});
});

View File

@@ -10,6 +10,7 @@ const ArrayTags = [
'tvshow.thumb',
'tvshow.tag',
'tvshow.actor',
'tvshow.uniqueid',
];
export class TvShowNfoParser extends BaseNfoParser<typeof TvShowNfoContainer> {