From 63db7140cfaccb8aec545f691f8072c5b9e53971 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 20 Sep 2021 17:14:45 +0300 Subject: [PATCH] Update sort.js --- scripts/sort.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/sort.js b/scripts/sort.js index 976dfcae0..c199bd5d1 100644 --- a/scripts/sort.js +++ b/scripts/sort.js @@ -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')