diff --git a/scripts/commands/playlist/generate.ts b/scripts/commands/playlist/generate.ts index 4d4663bf4d..6fcb0cf18d 100644 --- a/scripts/commands/playlist/generate.ts +++ b/scripts/commands/playlist/generate.ts @@ -56,7 +56,9 @@ async function main() { ) logger.info('filtering streams...') - streams = streams.uniqBy((stream: Stream) => stream.getId() || uniqueId()) + streams = streams + .filter((stream: Stream) => !!stream.getId()) + .uniqBy((stream: Stream) => stream.getId() || uniqueId()) const { categories, countries, subdivisions, cities, regions } = data