Update generate-playlist.js
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
module.exports = function () {
|
||||
return this.group_title || 'Undefined'
|
||||
if (this.group_title) return this.group_title
|
||||
|
||||
if (this.categories.length) {
|
||||
return this.categories
|
||||
.map(category => category.name)
|
||||
.sort()
|
||||
.join(';')
|
||||
}
|
||||
|
||||
return 'Undefined'
|
||||
}
|
||||
|
||||
@@ -2,6 +2,5 @@ exports.group_title = require('./group_title')
|
||||
exports.title = require('./title')
|
||||
exports.tvg_id = require('./tvg_id')
|
||||
exports.tvg_logo = require('./tvg_logo')
|
||||
exports.tvg_url = require('./tvg_url')
|
||||
exports.tvg_country = require('./tvg_country')
|
||||
exports.tvg_language = require('./tvg_language')
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
module.exports = function () {
|
||||
return this.tvg_country || ''
|
||||
if (this.tvg_country) return this.tvg_country
|
||||
|
||||
if (this.broadcast_area.length) {
|
||||
return this.broadcast_area
|
||||
.map(item => {
|
||||
const [_, code] = item.split('/')
|
||||
return code
|
||||
})
|
||||
.filter(i => i)
|
||||
.sort()
|
||||
.join(';')
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
module.exports = function () {
|
||||
return this.tvg_language || ''
|
||||
if (this.tvg_language) return this.tvg_language
|
||||
|
||||
if (this.languages.length) {
|
||||
return this.languages
|
||||
.map(language => (language ? language.name : null))
|
||||
.filter(l => l)
|
||||
.sort()
|
||||
.join(';')
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
module.exports = function () {
|
||||
return this.tvg_logo || ''
|
||||
if (this.tvg_logo) return this.tvg_logo
|
||||
|
||||
return this.logo || ''
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = function () {
|
||||
return this.tvg_url || ''
|
||||
}
|
||||
Reference in New Issue
Block a user