Update sort.js
This commit is contained in:
parent
6f6aea9699
commit
63db7140cf
|
@ -22,8 +22,12 @@ async function main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function sortChannels(playlist) {
|
async function sortChannels(playlist) {
|
||||||
const channels = [...playlist.channels]
|
let channels = [...playlist.channels]
|
||||||
utils.sortBy(channels, ['name', 'status', 'url'])
|
channels = utils.sortBy(
|
||||||
|
channels,
|
||||||
|
['name', 'status', 'resolution.height', 'url'],
|
||||||
|
['asc', 'asc', 'desc', 'asc']
|
||||||
|
)
|
||||||
|
|
||||||
if (JSON.stringify(channels) !== JSON.stringify(playlist.channels)) {
|
if (JSON.stringify(channels) !== JSON.stringify(playlist.channels)) {
|
||||||
log.print('updated')
|
log.print('updated')
|
||||||
|
|
Loading…
Reference in New Issue