mirror of
https://github.com/iptv-org/iptv
synced 2026-10-25 12:28:53 -04:00
Upgrade to last version of iptv-playlist-parser
This commit is contained in:
1 parent
f689510a8e
commit
8892ee67e4
4 files changed
+8
-11
No files matched your search
+1
-1
@@ -69,7 +69,7 @@ async function main() {
|
||||
}
|
||||
}
|
||||
|
||||
const epgUrl = playlist.attrs['x-tvg-url']
|
||||
const epgUrl = playlist.header.attrs['x-tvg-url']
|
||||
if(epgUrl && !buffer[epgUrl] && parseEpg) {
|
||||
console.log(`Loading '${epgUrl}'...`)
|
||||
const epg = await util.loadEPG(epgUrl)
|
||||
|
||||
+3
-6
@@ -18,17 +18,14 @@ let cache = {}
|
||||
|
||||
class Playlist {
|
||||
constructor(data) {
|
||||
this.attrs = {
|
||||
'x-tvg-url': data.tvg.url
|
||||
}
|
||||
|
||||
this.header = data.header
|
||||
this.items = data.items
|
||||
}
|
||||
|
||||
getHeader() {
|
||||
let parts = ['#EXTM3U']
|
||||
for(let key in this.attrs) {
|
||||
let value = this.attrs[key]
|
||||
for(let key in this.header.attrs) {
|
||||
let value = this.header.attrs[key]
|
||||
if(value) {
|
||||
parts.push(`${key}="${value}"`)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user