Update format.js

This commit is contained in:
freearhey 2021-05-07 03:29:54 +03:00
parent 6e47b4008d
commit 60d3f12ca5
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ const https = require('https')
program program
.usage('[OPTIONS]...') .usage('[OPTIONS]...')
.option('-d, --debug', 'Debug mode') .option('-d, --debug', 'Debug mode')
.option('-r --resolution', 'Parse stream resolution')
.option('-c, --country <country>', 'Comma-separated list of country codes', '') .option('-c, --country <country>', 'Comma-separated list of country codes', '')
.option('-e, --exclude <exclude>', 'Comma-separated list of country codes to be excluded', '') .option('-e, --exclude <exclude>', 'Comma-separated list of country codes to be excluded', '')
.option('--delay <delay>', 'Delay between parser requests', 1000) .option('--delay <delay>', 'Delay between parser requests', 1000)
@ -74,6 +75,7 @@ async function filterChannels(playlist) {
} }
async function detectResolution(playlist) { async function detectResolution(playlist) {
if (!config.resolution) return playlist
console.log(' Detecting resolution...') console.log(' Detecting resolution...')
const bar = new ProgressBar(' Progress: [:bar] :current/:total (:percent) ', { const bar = new ProgressBar(' Progress: [:bar] :current/:total (:percent) ', {
total: playlist.channels.length total: playlist.channels.length