diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index c2cd97f36e..8f420b8577 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -39,7 +39,7 @@ async function main() { const streams = await parser.parse(files) const buffer = new Dictionary() streams.forEach((stream: Stream) => { - if (!selectedFiles.includes(stream.filepath)) { + if (!stream.filepath || !selectedFiles.includes(stream.filepath)) { buffer.set(stream.url, stream) } }) @@ -70,7 +70,7 @@ async function main() { log.add({ type: 'error', line: stream.getLine(), - message: `"${stream.url}" is already in the "${origin.filepath}"` + message: `"${stream.url}" is already in the "${origin?.filepath}"` }) } else { buffer.set(stream.url, stream)