Update generate-playlists.js

This commit is contained in:
Aleksandr Statciuk 2022-02-08 01:11:47 +03:00
parent 96403d463e
commit 62ce78bbdf
32 changed files with 187 additions and 117 deletions

View file

@ -1,12 +1,3 @@
module.exports = function () {
if (this.group_title !== undefined) return this.group_title
if (Array.isArray(this.categories) && this.categories.length) {
return this.categories
.map(i => i.name)
.sort()
.join(';')
}
return 'Undefined'
return this.group_title || 'Undefined'
}

View file

@ -1,7 +1,7 @@
exports.group_title = require('./group_title')
exports.title = require('./title')
exports.tvg_country = require('./tvg_country')
exports.tvg_id = require('./tvg_id')
exports.tvg_language = require('./tvg_language')
exports.tvg_logo = require('./tvg_logo')
exports.tvg_url = require('./tvg_url')
exports.tvg_country = require('./tvg_country')
exports.tvg_language = require('./tvg_language')

View file

@ -1,3 +1,3 @@
module.exports = function () {
return Array.isArray(this.broadcast_area) ? this.broadcast_area.join(';') : ''
return this.tvg_country || ''
}

View file

@ -1,3 +1,3 @@
module.exports = function () {
return Array.isArray(this.languages) ? this.languages.map(i => i.name).join(';') : ''
return this.tvg_language || ''
}

View file

@ -1,3 +1,3 @@
module.exports = function () {
return this.channel && this.channel.logo ? this.channel.logo : ''
return this.tvg_logo || ''
}

View file

@ -1,3 +1,3 @@
module.exports = function () {
return this.guides.length ? this.guides[0] : ''
return this.tvg_url || ''
}