update plex 2

fix parser context
This commit is contained in:
StrangeDrVN committed 2026-01-15 17:53:47 +05:30
1 parent 1be21bcf90
commit 85f829b2db
3 files changed
+2220 -13

No files matched your search

+15 -10
View File
@@ -31,20 +31,25 @@ it('can parse response', () => {
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
let results = parser({ content })
results = results.map(p => {
p.start = p.start.toJSON()
p.stop = p.stop.toJSON()
if (p.start) p.start = p.start.toJSON()
if (p.stop) p.stop = p.stop.toJSON()
return p
})
// expect(results.length).toBe(15)
expect(results[0]).toMatchObject({
start: '2023-02-04T23:31:14.000Z',
stop: '2023-02-05T01:10:45.000Z',
title: 'Violet & Daisy',
description:
'Two teenage assassins accept what they think will be a quick-and-easy job, until an unexpected target throws them off their plan.',
image: 'https://provider-static.plex.tv/epg/images/ott_channels/arts/darkmatter-tv-about.jpg',
categories: ['Movies']
title: 'The Nanny',
subTitle: "Yetta's Lettas",
description: expect.stringContaining('Maxwell battles an old rival'),
image: expect.stringContaining('http')
})
expect(results[1]).toMatchObject({
title: 'The Nanny',
subTitle: 'The Baby Shower',
description: expect.stringContaining('A psychic predicts that Maxwell'),
season: 6,
episode: 20,
image: expect.stringContaining('17nyw13tvyrd61fd9cimazndar.png')
})
})