Upgrade to last version of iptv-playlist-parser

This commit is contained in:
freearhey
2019-10-07 04:15:27 +03:00
parent f689510a8e
commit 8892ee67e4
4 changed files with 8 additions and 11 deletions

View File

@@ -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}"`)
}