Remove filterChannels() function
This commit is contained in:
parent
3c794d6eb7
commit
eca41ddc32
|
@ -1,5 +1,4 @@
|
||||||
const { program } = require('commander')
|
const { program } = require('commander')
|
||||||
const blacklist = require('./blacklist')
|
|
||||||
const parser = require('./parser')
|
const parser = require('./parser')
|
||||||
const utils = require('./utils')
|
const utils = require('./utils')
|
||||||
const axios = require('axios')
|
const axios = require('axios')
|
||||||
|
@ -35,7 +34,6 @@ async function main() {
|
||||||
for (const playlist of playlists) {
|
for (const playlist of playlists) {
|
||||||
await loadPlaylist(playlist.url)
|
await loadPlaylist(playlist.url)
|
||||||
.then(sortChannels)
|
.then(sortChannels)
|
||||||
.then(filterChannels)
|
|
||||||
.then(detectResolution)
|
.then(detectResolution)
|
||||||
.then(savePlaylist)
|
.then(savePlaylist)
|
||||||
.then(done)
|
.then(done)
|
||||||
|
@ -67,16 +65,6 @@ async function sortChannels(playlist) {
|
||||||
return playlist
|
return playlist
|
||||||
}
|
}
|
||||||
|
|
||||||
async function filterChannels(playlist) {
|
|
||||||
console.info(` Filtering channels...`)
|
|
||||||
const list = blacklist.map(i => i.toLowerCase())
|
|
||||||
playlist.channels = playlist.channels.filter(i => {
|
|
||||||
return !list.includes(i.name.toLowerCase())
|
|
||||||
})
|
|
||||||
|
|
||||||
return playlist
|
|
||||||
}
|
|
||||||
|
|
||||||
async function detectResolution(playlist) {
|
async function detectResolution(playlist) {
|
||||||
if (!config.resolution) return playlist
|
if (!config.resolution) return playlist
|
||||||
console.log(' Detecting resolution...')
|
console.log(' Detecting resolution...')
|
||||||
|
|
Loading…
Reference in New Issue