Merge pull request #4051 from iptv-org/fix-update-readme-script

Fix "update-readme" script
This commit is contained in:
Dum4G 2021-08-12 14:36:19 +03:00 committed by GitHub
commit dcd178be34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 17 deletions

13
.gitignore vendored
View File

@ -1,12 +1 @@
node_modules/
error.log
helpers/categories.md
helpers/countries.md
# IDE
*.sublime-project
*.sublime-workspace
.idea
# OS
.DS_Store
node_modules

3
.readme/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
_categories.md
_countries.md
_languages.md

View File

@ -1,7 +1,6 @@
# IPTV
![auto-update](https://github.com/iptv-org/iptv/actions/workflows/auto-update.yml/badge.svg)
![clean](https://github.com/iptv-org/iptv/actions/workflows/clean.yml/badge.svg)
[![auto-update](https://github.com/iptv-org/iptv/actions/workflows/auto-update.yml/badge.svg)](https://github.com/iptv-org/iptv/actions/workflows/auto-update.yml)
Collection of publicly available IPTV channels from all over the world.

View File

@ -25,7 +25,7 @@ function generateCategoriesTable() {
for (const category of [...db.categories.all(), { name: 'Other', id: 'other' }]) {
categories.push({
category: category.name,
channels: db.channels.forCategory(category).removeDuplicates().count(),
channels: db.channels.forCategory(category).removeOffline().removeDuplicates().count(),
playlist: `<code>https://iptv-org.github.io/iptv/categories/${category.id}.m3u</code>`
})
}
@ -53,7 +53,12 @@ function generateCountriesTable() {
const prefix = flag ? `${flag}&nbsp;` : ''
countries.push({
country: prefix + country.name,
channels: db.channels.forCountry(country).removeDuplicates().removeNSFW().count(),
channels: db.channels
.forCountry(country)
.removeOffline()
.removeDuplicates()
.removeNSFW()
.count(),
playlist: `<code>https://iptv-org.github.io/iptv/countries/${country.code}.m3u</code>`
})
}
@ -79,7 +84,12 @@ function generateLanguagesTable() {
]) {
languages.push({
language: language.name,
channels: db.channels.forLanguage(language).removeDuplicates().removeNSFW().count(),
channels: db.channels
.forLanguage(language)
.removeOffline()
.removeDuplicates()
.removeNSFW()
.count(),
playlist: `<code>https://iptv-org.github.io/iptv/languages/${language.code}.m3u</code>`
})
}