diff --git a/scripts/update-readme.js b/scripts/update-readme.js
index b6f22ef91b..fdea7885d9 100644
--- a/scripts/update-readme.js
+++ b/scripts/update-readme.js
@@ -26,6 +26,15 @@ function parseIndex() {
let countries = {}
let languages = {}
let categories = {}
+
+ for (let categoryCode in helper.supportedCategories) {
+ categories[categoryCode] = {
+ category: helper.supportedCategories[categoryCode],
+ channels: 0,
+ playlist: `https://iptv-org.github.io/iptv/categories/${categoryCode}.m3u
`
+ }
+ }
+
for (let rootItem of root.items) {
const playlist = helper.parsePlaylist(rootItem.url)
const countryName = rootItem.name
@@ -74,12 +83,6 @@ function parseIndex() {
const categoryCode = categoryName.toLowerCase()
if (categories[categoryCode]) {
categories[categoryCode].channels++
- } else {
- categories[categoryCode] = {
- category: categoryName,
- channels: 1,
- playlist: `https://iptv-org.github.io/iptv/categories/${categoryCode}.m3u
`
- }
}
}
}