mirror of
https://github.com/chrisbenincasa/tunarr
synced 2026-04-21 13:37:15 +00:00
parent
3af479008b
commit
89eb55c82c
2 changed files with 17 additions and 0 deletions
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ const ArrayTags = [
|
|||
'tvshow.thumb',
|
||||
'tvshow.tag',
|
||||
'tvshow.actor',
|
||||
'tvshow.uniqueid',
|
||||
];
|
||||
|
||||
export class TvShowNfoParser extends BaseNfoParser<typeof TvShowNfoContainer> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue