mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 01:50:04 -04:00
Update playlist.js
This commit is contained in:
parent
36da1c9214
commit
eade07df8e
1 changed files with 0 additions and 7 deletions
|
@ -7,12 +7,6 @@ const playlist = {}
|
||||||
class Playlist {
|
class Playlist {
|
||||||
constructor(items = [], options = {}) {
|
constructor(items = [], options = {}) {
|
||||||
this.header = {}
|
this.header = {}
|
||||||
if (options.public) {
|
|
||||||
let guides = items
|
|
||||||
.map(item => (item.guides.length ? item.guides[0].url : null))
|
|
||||||
.filter(i => i)
|
|
||||||
this.header['x-tvg-url'] = _.uniq(guides).sort().join(',')
|
|
||||||
}
|
|
||||||
|
|
||||||
this.links = []
|
this.links = []
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
|
@ -29,7 +23,6 @@ class Playlist {
|
||||||
} else {
|
} else {
|
||||||
attrs = {
|
attrs = {
|
||||||
'tvg-id': stream.get('tvg_id'),
|
'tvg-id': stream.get('tvg_id'),
|
||||||
status: stream.get('status'),
|
|
||||||
'user-agent': stream.get('user_agent') || undefined
|
'user-agent': stream.get('user_agent') || undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue