MCPcopy Index your code
hub / github.com/iptv-org/iptv / updateWithIssue

Method updateWithIssue

scripts/models/stream.ts:35–58  ·  view source on GitHub ↗
(dataSet: DataSet)

Source from the content-addressed store, hash-verified

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) {

Callers 1

editStreamFunction · 0.80

Calls 4

updateTvgIdMethod · 0.95
getStringMethod · 0.80
updateFilepathMethod · 0.80
updateTitleMethod · 0.80

Tested by

no test coverage detected