Update generate.js

This commit is contained in:
Aleksandr Statciuk 2021-08-03 02:30:26 +03:00
parent 7bd78d7bc0
commit 06b204c4e8
1 changed files with 13 additions and 13 deletions

View File

@ -8,15 +8,15 @@ async function main() {
await loadDatabase()
createRootDirectory()
createNoJekyllFile()
generateIndex()
generateCategoryIndex()
// generateIndex()
// generateCategoryIndex()
generateCountryIndex()
generateLanguageIndex()
generateCategories()
generateCountries()
generateLanguages()
generateChannelsJson()
showResults()
// generateCategories()
// generateCountries()
// generateLanguages()
// generateChannelsJson()
// showResults()
}
async function loadDatabase() {
@ -74,13 +74,13 @@ function generateCountryIndex() {
.removeDuplicates()
.get()
for (const channel of channels) {
const category = channel.category
const groupTitle = channel.group.title
const nsfw = channel.isNSFW()
channel.category = country.name || ''
channel.group.title = country.name || ''
if (!nsfw) {
file.append(filename, channel.toString())
}
channel.category = category
channel.group.title = groupTitle
}
}
}
@ -97,13 +97,13 @@ function generateLanguageIndex() {
.removeDuplicates()
.get()
for (const channel of channels) {
const category = channel.category
const groupTitle = channel.group.title
const nsfw = channel.isNSFW()
channel.category = language.name || ''
channel.group.title = language.name || ''
if (!nsfw) {
file.append(filename, channel.toString())
}
channel.category = category
channel.group.title = groupTitle
}
}
}