fix: tolerate missing playlist metadata (#49868)

This commit is contained in:
chen zhihao authored and GitHub committed 2026-09-04 17:12:25 +02:00
1 parent 2f83f28352
commit 9652409093
3 files changed
+16 -4

No files matched your search

@@ -0,0 +1,3 @@
#EXTM3U
#EXTINF:-1,Example
https://example.com/live.m3u8
+8
View File
@@ -101,4 +101,12 @@ describe('playlist:validate', () => {
const stdout = execSync(cmd, { encoding: 'utf8' })
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
})
it('accepts a playlist without optional metadata attributes', () => {
const cmd = `${ENV_VAR} npm run playlist:validate -- missing_metadata.m3u`
const stdout = execSync(cmd, { encoding: 'utf8' })
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
expect(stdout).toContain('missing_metadata.m3u')
expect(stdout).toContain('is missing a channel ID')
})
})