mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 18:10:04 -04:00
Created sports channel playlist
This commit is contained in:
parent
804168c5a5
commit
b016a171ec
3 changed files with 124 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
const util = require('./util')
|
||||
const urlParser = require('url')
|
||||
|
||||
const types = ['full', 'country', 'content']
|
||||
const types = ['full', 'country', 'content', 'sport']
|
||||
const debug = false
|
||||
let cache = {}
|
||||
let stats = {
|
||||
|
@ -50,12 +50,20 @@ function init() {
|
|||
groupTitle = countryName
|
||||
} else if(type === 'content') {
|
||||
groupTitle = channel.group
|
||||
} else {
|
||||
groupTitle = channel.group
|
||||
}
|
||||
|
||||
const info = `-1 tvg-id="${channel.id}" tvg-name="${channel.name}" tvg-logo="${channel.logo}" group-title="${groupTitle}",${channel.title}`
|
||||
const data = '#EXTINF:' + info + '\n' + file + '\n'
|
||||
|
||||
util.writeToFile(`index.${type}.m3u`, data)
|
||||
if(type === 'sport') {
|
||||
if(groupTitle === 'Sport') {
|
||||
util.writeToFile(`index.${type}.m3u`, data)
|
||||
}
|
||||
} else {
|
||||
util.writeToFile(`index.${type}.m3u`, data)
|
||||
}
|
||||
}
|
||||
|
||||
addToCache(file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue