Created sports channel playlist

This commit is contained in:
freearhey 2019-07-24 12:12:15 +03:00
parent 804168c5a5
commit b016a171ec
3 changed files with 124 additions and 4 deletions

View File

@ -29,8 +29,9 @@ Below you can find a manually selected list of such applications for different p
If your application does not support nested playlists, you can instead use one of these playlists: If your application does not support nested playlists, you can instead use one of these playlists:
- `https://raw.githubusercontent.com/freearhey/iptv/master/index.full.m3u` (grouped by country and content) - `https://raw.githubusercontent.com/freearhey/iptv/master/index.full.m3u` (grouped by country and content)
- `https://raw.githubusercontent.com/freearhey/iptv/master/index.country.m3u` (grouped only by country) - `https://raw.githubusercontent.com/freearhey/iptv/master/index.country.m3u` (grouped by country)
- `https://raw.githubusercontent.com/freearhey/iptv/master/index.content.m3u` (grouped only by content) - `https://raw.githubusercontent.com/freearhey/iptv/master/index.content.m3u` (grouped by content)
- `https://raw.githubusercontent.com/freearhey/iptv/master/index.sport.m3u` (contains only sports channels)
Or select a playlist for a specific country from the list below. Or select a playlist for a specific country from the list below.

View File

@ -1,7 +1,7 @@
const util = require('./util') const util = require('./util')
const urlParser = require('url') const urlParser = require('url')
const types = ['full', 'country', 'content'] const types = ['full', 'country', 'content', 'sport']
const debug = false const debug = false
let cache = {} let cache = {}
let stats = { let stats = {
@ -50,12 +50,20 @@ function init() {
groupTitle = countryName groupTitle = countryName
} else if(type === 'content') { } else if(type === 'content') {
groupTitle = channel.group 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 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' 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) addToCache(file)

111
index.sport.m3u Normal file

File diff suppressed because one or more lines are too long