Update format.js

Removed deleted channels counter
This commit is contained in:
freearhey 2019-08-10 00:58:11 +03:00
parent 85df70d6f2
commit 598e90097e

View File

@ -6,8 +6,7 @@ let stats = {
total: 0, total: 0,
updated: 0, updated: 0,
duplicates: 0, duplicates: 0,
unvalid: 0, unvalid: 0
removed: 0
} }
let buffer = {} let buffer = {}
@ -48,10 +47,8 @@ async function main() {
if(util.checkCache(channel.url)) { if(util.checkCache(channel.url)) {
stats.duplicates++ stats.duplicates++
stats.removed++
} else if(!util.validateUrl(channel.url)) { } else if(!util.validateUrl(channel.url)) {
stats.unvalid++ stats.unvalid++
stats.removed++
} else { } else {
channels.push(channel) channels.push(channel)
util.addToCache(channel.url) util.addToCache(channel.url)
@ -111,7 +108,7 @@ async function main() {
stats.total += channels.length stats.total += channels.length
} }
console.log(`Total: ${stats.total}. Duplicates: ${stats.duplicates}. Unvalid: ${stats.unvalid}. Updated: ${stats.updated}. Removed: ${stats.removed}.`) console.log(`Total: ${stats.total}. Duplicates: ${stats.duplicates}. Unvalid: ${stats.unvalid}. Updated: ${stats.updated}.`)
} }
main() main()