diff --git a/scripts/commands/api/generate.ts b/scripts/commands/api/generate.ts index a3390af8f..9f311fd38 100644 --- a/scripts/commands/api/generate.ts +++ b/scripts/commands/api/generate.ts @@ -13,7 +13,7 @@ async function main() { let streams = await parser.parse(files) streams = streams .map(data => new Stream(data)) - .orderBy([(stream: Stream) => stream.channel, (stream: Stream) => stream.timeshift]) + .orderBy([(stream: Stream) => stream.channel]) .map((stream: Stream) => stream.toJSON()) logger.info(`found ${streams.count()} streams`) diff --git a/scripts/commands/playlist/generate.ts b/scripts/commands/playlist/generate.ts index aeb02769a..bab7839fd 100644 --- a/scripts/commands/playlist/generate.ts +++ b/scripts/commands/playlist/generate.ts @@ -105,7 +105,6 @@ async function loadStreams({ .orderBy( [ (stream: Stream) => stream.channel, - (stream: Stream) => stream.timeshift, (stream: Stream) => parseInt(stream.quality.replace('p', '')), (stream: Stream) => stream.label ], diff --git a/scripts/commands/playlist/update.ts b/scripts/commands/playlist/update.ts index 928e30584..fe861924a 100644 --- a/scripts/commands/playlist/update.ts +++ b/scripts/commands/playlist/update.ts @@ -105,7 +105,6 @@ async function editStreams(loader: IssueLoader) { if (data.has('label')) stream.label = data.getString('label') if (data.has('quality')) stream.quality = data.getString('quality') - if (data.has('timeshift')) stream.timeshift = data.getString('timeshift') if (data.has('user_agent')) stream.userAgent = data.getString('user_agent') if (data.has('http_referrer')) stream.httpReferrer = data.getString('http_referrer') @@ -132,7 +131,6 @@ async function addStreams(loader: IssueLoader) { url: data.getString('stream_url'), label: data.getString('label'), quality: data.getString('quality'), - timeshift: data.getString('timeshift'), userAgent: data.getString('user_agent'), httpReferrer: data.getString('http_referrer'), filepath: `${channel.country.toLowerCase()}.m3u`, diff --git a/scripts/core/issueParser.ts b/scripts/core/issueParser.ts index 8b3dd8a67..0c3cad186 100644 --- a/scripts/core/issueParser.ts +++ b/scripts/core/issueParser.ts @@ -12,8 +12,6 @@ const FIELDS = new Dictionary({ 'Broken Links': 'broken_links', Label: 'label', Quality: 'quality', - Timeshift: 'timeshift', - 'Timeshift (optional)': 'timeshift', 'Channel Name': 'channel_name', 'HTTP User-Agent': 'user_agent', 'HTTP Referrer': 'http_referrer', diff --git a/scripts/core/playlistParser.ts b/scripts/core/playlistParser.ts index cae8ffb4f..f73902092 100644 --- a/scripts/core/playlistParser.ts +++ b/scripts/core/playlistParser.ts @@ -40,8 +40,7 @@ export class PlaylistParser { line: item.line, url: item.url, httpReferrer: item.http.referrer, - userAgent: item.http['user-agent'], - timeshift: item.tvg.shift + userAgent: item.http['user-agent'] }) streams.add(stream) diff --git a/scripts/models/stream.ts b/scripts/models/stream.ts index 6d8217548..3c2991452 100644 --- a/scripts/models/stream.ts +++ b/scripts/models/stream.ts @@ -11,7 +11,6 @@ type StreamProps = { label?: string quality?: string userAgent?: string - timeshift?: string } export class Stream { @@ -31,7 +30,6 @@ export class Stream { isNSFW: boolean groupTitle: string removed: boolean = false - timeshift: string constructor({ channel, @@ -42,8 +40,7 @@ export class Stream { name, quality, url, - userAgent, - timeshift + userAgent }: StreamProps) { this.channel = channel || '' this.filepath = filepath @@ -60,7 +57,6 @@ export class Stream { this.languages = new Collection() this.isNSFW = false this.groupTitle = 'Undefined' - this.timeshift = timeshift || '' } normalizeURL() { @@ -149,7 +145,6 @@ export class Stream { return { channel: this.channel || null, url: this.url, - timeshift: this.timeshift || null, http_referrer: this.httpReferrer || null, user_agent: this.userAgent || null } @@ -158,10 +153,6 @@ export class Stream { toString(options: { public: boolean }) { let output = `#EXTINF:-1 tvg-id="${this.channel}"` - if (this.timeshift) { - output += ` tvg-shift="${this.timeshift}"` - } - if (options.public) { output += ` tvg-logo="${this.logo}" group-title="${this.groupTitle}"` }