Update format.js
This commit is contained in:
parent
6e47b4008d
commit
60d3f12ca5
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue