Update generate.js
Removed duplicate counter
This commit is contained in:
parent
f1ca94130d
commit
2a8176d65a
@ -4,8 +4,7 @@ const debug = false
|
|||||||
const types = ['full', 'country', 'content', 'sport']
|
const types = ['full', 'country', 'content', 'sport']
|
||||||
let stats = {
|
let stats = {
|
||||||
countries: 0,
|
countries: 0,
|
||||||
channels: 0,
|
channels: 0
|
||||||
duplicates: 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
@ -49,12 +48,6 @@ function main() {
|
|||||||
title: item.inf.title
|
title: item.inf.title
|
||||||
})
|
})
|
||||||
|
|
||||||
if(util.checkCache(channel.url)) {
|
|
||||||
|
|
||||||
stats.duplicates++
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
let category = channel.group
|
let category = channel.group
|
||||||
|
|
||||||
for(const type of types) {
|
for(const type of types) {
|
||||||
@ -76,9 +69,6 @@ function main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
util.addToCache(channel.url)
|
|
||||||
}
|
|
||||||
|
|
||||||
stats.channels++
|
stats.channels++
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,4 +78,4 @@ function main() {
|
|||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
console.log(`Countries: ${stats.countries}. Channels: ${stats.channels}. Unique: ${stats.channels - stats.duplicates}. Duplicates: ${stats.duplicates}.`)
|
console.log(`Countries: ${stats.countries}. Channels: ${stats.channels}.`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user