diff --git a/scripts/commands/playlist/generate.ts b/scripts/commands/playlist/generate.ts index a84bd82651..16876411a8 100644 --- a/scripts/commands/playlist/generate.ts +++ b/scripts/commands/playlist/generate.ts @@ -40,9 +40,6 @@ async function main() { logger.info('generating raw/...') await new RawGenerator({ streams, logFile }).generate() - logger.info('filtering streams...') - streams = streams.uniqBy((stream: Stream) => stream.getId() || uniqueId()) - logger.info('sorting streams...') streams = streams.sortBy( [ @@ -50,9 +47,12 @@ async function main() { (stream: Stream) => stream.getVerticalResolution(), (stream: Stream) => stream.label ], - ['asc', 'asc', 'desc'] + ['asc', 'desc', 'desc'] ) + logger.info('filtering streams...') + streams = streams.uniqBy((stream: Stream) => stream.getId() || uniqueId()) + const { categories, countries, subdivisions, cities, regions } = data logger.info('generating categories/...')