Update playlist/generate.js

This commit is contained in:
Aleksandr Statciuk 2022-02-12 04:09:21 +03:00
parent e2046899e9
commit 90aaf7f1c7
2 changed files with 4 additions and 4 deletions

View file

@ -32,9 +32,9 @@ main()
async function loadStreams() {
await db.streams.load()
let streams = await db.streams.find({ is_broken: false })
streams = _.orderBy(
streams = orderBy(
streams,
['channel_name', 'status.level', 'resolution.height', 'url'],
['channel_name', i => i.status.level, i => i.resolution.height, 'url'],
['asc', 'asc', 'desc', 'asc']
)
streams = _.uniqBy(streams, stream => stream.channel_id || _.uniqueId())