Clear cache before parsing each playlist
This commit is contained in:
parent
92d8bd9899
commit
54b30b8af5
|
@ -15,11 +15,14 @@ async function main() {
|
||||||
let countries = playlist.items
|
let countries = playlist.items
|
||||||
if(debug) {
|
if(debug) {
|
||||||
console.log('Debug mode is turn on')
|
console.log('Debug mode is turn on')
|
||||||
countries = countries.slice(0, 1)
|
// countries = countries.slice(0, 1)
|
||||||
// countries = [{ url: 'channels/ru.m3u' }]
|
countries = [{ url: 'channels/ru.m3u' }, { url: 'channels/ua.m3u' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let country of countries) {
|
for(let country of countries) {
|
||||||
|
console.log(`Clear cache...`)
|
||||||
|
util.clearCache()
|
||||||
|
|
||||||
console.log(`Parsing '${country.url}'...`)
|
console.log(`Parsing '${country.url}'...`)
|
||||||
const playlist = util.parsePlaylist(country.url)
|
const playlist = util.parsePlaylist(country.url)
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ function main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let country of countries) {
|
for(let country of countries) {
|
||||||
|
console.log(`Clear cache...`)
|
||||||
|
util.clearCache()
|
||||||
|
|
||||||
console.log(`Parsing '${country.url}'...`)
|
console.log(`Parsing '${country.url}'...`)
|
||||||
const playlist = util.parsePlaylist(country.url)
|
const playlist = util.parsePlaylist(country.url)
|
||||||
|
|
Loading…
Reference in New Issue