(dataSet: DataSet)
| 33 | } |
| 34 | |
| 35 | updateWithIssue(dataSet: DataSet): this { |
| 36 | const streamId = dataSet.getString('stream_id') || '' |
| 37 | const [channelId, feedId] = streamId.split('@') |
| 38 | |
| 39 | if (channelId) { |
| 40 | this.channel = channelId |
| 41 | this.feed = feedId |
| 42 | this.updateTvgId().updateTitle().updateFilepath() |
| 43 | } |
| 44 | |
| 45 | const data = { |
| 46 | label: dataSet.getString('label'), |
| 47 | quality: dataSet.getString('quality'), |
| 48 | httpUserAgent: dataSet.getString('http_user_agent'), |
| 49 | httpReferrer: dataSet.getString('http_referrer') |
| 50 | } |
| 51 | |
| 52 | if (data.label !== undefined) this.label = data.label |
| 53 | if (data.quality !== undefined) this.quality = data.quality |
| 54 | if (data.httpUserAgent !== undefined) this.user_agent = data.httpUserAgent |
| 55 | if (data.httpReferrer !== undefined) this.referrer = data.httpReferrer |
| 56 | |
| 57 | return this |
| 58 | } |
| 59 | |
| 60 | static fromPlaylistItem(data: parser.PlaylistItem): Stream { |
| 61 | function escapeRegExp(text) { |
no test coverage detected