wip
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
module.exports = function () {
|
||||
if (this.group_title) return this.group_title
|
||||
if (this.group_title !== undefined) return this.group_title
|
||||
|
||||
if (Array.isArray(this.categories)) {
|
||||
return this.categories
|
||||
|
@@ -1,5 +1,5 @@
|
||||
exports.group_title = require('./group_title')
|
||||
exports.display_name = require('./display_name')
|
||||
exports.title = require('./title')
|
||||
exports.tvg_country = require('./tvg_country')
|
||||
exports.tvg_id = require('./tvg_id')
|
||||
exports.tvg_language = require('./tvg_language')
|
||||
|
@@ -1,5 +1,5 @@
|
||||
module.exports = function () {
|
||||
let title = this.title
|
||||
let title = this.channel_name
|
||||
|
||||
if (this.resolution.height) {
|
||||
title += ` (${this.resolution.height}p)`
|
@@ -1,5 +1,3 @@
|
||||
module.exports = function () {
|
||||
if (this.tvg_country) return this.tvg_country
|
||||
|
||||
return Array.isArray(this.countries) ? this.countries.map(i => i.code).join(';') : ''
|
||||
return Array.isArray(this.broadcast_area) ? this.broadcast_area.join(';') : ''
|
||||
}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
module.exports = function () {
|
||||
return this.id || ''
|
||||
return this.channel_id || ''
|
||||
}
|
||||
|
@@ -1,3 +1,3 @@
|
||||
module.exports = function () {
|
||||
return this.logo || ''
|
||||
return this.channel && this.channel.logo ? this.channel.logo : ''
|
||||
}
|
||||
|
@@ -1,5 +1,10 @@
|
||||
const { parser } = require('../../core')
|
||||
|
||||
module.exports = function ({ title }) {
|
||||
return parser.parseChannelName(title)
|
||||
return title
|
||||
.trim()
|
||||
.split(' ')
|
||||
.map(s => s.trim())
|
||||
.filter(s => {
|
||||
return !/\[|\]/i.test(s) && !/\((\d+)P\)/i.test(s)
|
||||
})
|
||||
.join(' ')
|
||||
}
|
||||
|
Reference in New Issue
Block a user