diff --git a/scripts/models/stream.ts b/scripts/models/stream.ts index be2c7c91fb..453b971c1d 100644 --- a/scripts/models/stream.ts +++ b/scripts/models/stream.ts @@ -303,6 +303,8 @@ export class Stream extends sdk.Models.Stream { } updateFilepath(): this { + if (this.filepath) return this + const channel = this.getChannel() if (!channel) return this diff --git a/tests/__data__/expected/playlist_update/br_example.m3u b/tests/__data__/expected/playlist_update/br_example.m3u new file mode 100644 index 0000000000..0400ad8373 --- /dev/null +++ b/tests/__data__/expected/playlist_update/br_example.m3u @@ -0,0 +1,4 @@ +#EXTM3U +#EXTINF:-1 tvg-id="BBCAmerica.us@East",BBC America East (720p) +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 Edge/12.246 +https://servilive.com:3126/live/tele2000live.m3u8 diff --git a/tests/__data__/expected/playlist_update/us.m3u b/tests/__data__/expected/playlist_update/us.m3u index 1b78e84f6c..d16ed56287 100644 --- a/tests/__data__/expected/playlist_update/us.m3u +++ b/tests/__data__/expected/playlist_update/us.m3u @@ -1,6 +1,3 @@ #EXTM3U -#EXTINF:-1 tvg-id="BBCAmerica.us@East",BBC America East (720p) -#EXTVLCOPT:http-user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 Edge/12.246 -https://servilive.com:3126/live/tele2000live.m3u8 #EXTINF:-1 tvg-id="FastTV.us@SD",Fast TV https://3fa797d5.wurl.com/manifest/f36d25e7e52f1ba8d7e56eb859c636563214f541/T05PX01vdG9yVHJlbmRGYXN0VFZfSExT/b5e5e0e2-12b3-4312-93c9-c0a7c50b41ca/4.m3u8 diff --git a/tests/__data__/input/playlist_update/br.m3u b/tests/__data__/input/playlist_update/br.m3u index 31a8698610..6a78c15f31 100644 --- a/tests/__data__/input/playlist_update/br.m3u +++ b/tests/__data__/input/playlist_update/br.m3u @@ -1,6 +1,3 @@ #EXTM3U #EXTINF:-1 tvg-id="",VTV [Not 24/7] https://ythls.onrender.com/channel/UC40TUSUx490U5uR1lZt3Ajg.m3u8 -#EXTINF:-1 tvg-id="",Tele2000 [Not 24/7] -#EXTVLCOPT:http-referrer=https://example2.com/ -https://servilive.com:3126/live/tele2000live.m3u8 diff --git a/tests/__data__/input/playlist_update/br_example.m3u b/tests/__data__/input/playlist_update/br_example.m3u new file mode 100644 index 0000000000..705fd21079 --- /dev/null +++ b/tests/__data__/input/playlist_update/br_example.m3u @@ -0,0 +1,4 @@ +#EXTM3U +#EXTINF:-1 tvg-id="",Tele2000 [Not 24/7] +#EXTVLCOPT:http-referrer=https://example2.com/ +https://servilive.com:3126/live/tele2000live.m3u8