Update sort.js

This commit is contained in:
Aleksandr Statciuk 2021-09-20 17:14:45 +03:00
parent 6f6aea9699
commit 63db7140cf
1 changed files with 6 additions and 2 deletions

View File

@ -22,8 +22,12 @@ async function main() {
}
async function sortChannels(playlist) {
const channels = [...playlist.channels]
utils.sortBy(channels, ['name', 'status', 'url'])
let channels = [...playlist.channels]
channels = utils.sortBy(
channels,
['name', 'status', 'resolution.height', 'url'],
['asc', 'asc', 'desc', 'asc']
)
if (JSON.stringify(channels) !== JSON.stringify(playlist.channels)) {
log.print('updated')