mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-11 17:40:03 -04:00
Update scripts
This commit is contained in:
parent
a14ef9181a
commit
970b74aef2
5 changed files with 51 additions and 47 deletions
|
@ -8,9 +8,9 @@ type StreamProps = {
|
|||
line: number
|
||||
channel?: string
|
||||
httpReferrer?: string
|
||||
httpUserAgent?: string
|
||||
label?: string
|
||||
quality?: string
|
||||
userAgent?: string
|
||||
}
|
||||
|
||||
export class Stream {
|
||||
|
@ -22,7 +22,7 @@ export class Stream {
|
|||
name: string
|
||||
quality: string
|
||||
url: string
|
||||
userAgent: string
|
||||
httpUserAgent: string
|
||||
logo: string
|
||||
broadcastArea: Collection
|
||||
categories: Collection
|
||||
|
@ -40,7 +40,7 @@ export class Stream {
|
|||
name,
|
||||
quality,
|
||||
url,
|
||||
userAgent
|
||||
httpUserAgent
|
||||
}: StreamProps) {
|
||||
this.channel = channel || ''
|
||||
this.filepath = filepath
|
||||
|
@ -50,7 +50,7 @@ export class Stream {
|
|||
this.name = name
|
||||
this.quality = quality || ''
|
||||
this.url = url
|
||||
this.userAgent = userAgent || ''
|
||||
this.httpUserAgent = httpUserAgent || ''
|
||||
this.logo = ''
|
||||
this.broadcastArea = new Collection()
|
||||
this.categories = new Collection()
|
||||
|
@ -136,7 +136,7 @@ export class Stream {
|
|||
name: this.name,
|
||||
quality: this.quality,
|
||||
url: this.url,
|
||||
userAgent: this.userAgent,
|
||||
httpUserAgent: this.httpUserAgent,
|
||||
line: this.line
|
||||
}
|
||||
}
|
||||
|
@ -145,8 +145,8 @@ export class Stream {
|
|||
return {
|
||||
channel: this.channel || null,
|
||||
url: this.url,
|
||||
http_referrer: this.httpReferrer || null,
|
||||
user_agent: this.userAgent || null
|
||||
referrer: this.httpReferrer || null,
|
||||
user_agent: this.httpUserAgent || null
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,8 +157,12 @@ export class Stream {
|
|||
output += ` tvg-logo="${this.logo}" group-title="${this.groupTitle}"`
|
||||
}
|
||||
|
||||
if (this.userAgent) {
|
||||
output += ` user-agent="${this.userAgent}"`
|
||||
if (this.httpReferrer) {
|
||||
output += ` http-referrer="${this.httpReferrer}"`
|
||||
}
|
||||
|
||||
if (this.httpUserAgent) {
|
||||
output += ` http-user-agent="${this.httpUserAgent}"`
|
||||
}
|
||||
|
||||
output += `,${this.getTitle()}`
|
||||
|
@ -167,8 +171,8 @@ export class Stream {
|
|||
output += `\n#EXTVLCOPT:http-referrer=${this.httpReferrer}`
|
||||
}
|
||||
|
||||
if (this.userAgent) {
|
||||
output += `\n#EXTVLCOPT:http-user-agent=${this.userAgent}`
|
||||
if (this.httpUserAgent) {
|
||||
output += `\n#EXTVLCOPT:http-user-agent=${this.httpUserAgent}`
|
||||
}
|
||||
|
||||
output += `\n${this.url}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue