mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 18:10:04 -04:00
Upgrade to last version of iptv-playlist-parser
This commit is contained in:
parent
f8c956ad40
commit
5947ccf4a6
4 changed files with 8 additions and 11 deletions
|
@ -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}"`)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue