From f0f064d503621d6424b3863d4d0f65fb51ce52bf Mon Sep 17 00:00:00 2001 From: Diego <5572928+sguinetti@users.noreply.github.com> Date: Thu, 11 Aug 2022 17:41:03 -0500 Subject: [PATCH 1/5] Update pe.m3u MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Readd Congreso de la República --- streams/pe.m3u | 2 ++ 1 file changed, 2 insertions(+) diff --git a/streams/pe.m3u b/streams/pe.m3u index 95858e30a0..801f1177fe 100644 --- a/streams/pe.m3u +++ b/streams/pe.m3u @@ -443,6 +443,8 @@ https://live.obslivestream.com/vztv/index.m3u8 http://free.fullspeed.tv/iptv-query?streaming-ip=https://www.dailymotion.com/WillaxTV #EXTINF:-1 tvg-id="Wtv.pe" status="error",Wtv (Bambamarca) (480p) [Not 24/7] https://tv.inka.net.pe/wtv/wtv/index.m3u8 +#EXTINF:-1 tvg-id="CongresodelaRepubllica.pe" status="online",Congreso de la Repúbllica [Not 24/7] +http://free.fullspeed.tv/iptv-query?streaming-ip=https://www.youtube.com/c/CongresodelaRep%C3%BAblicadelPer%C3%BATVenvivo/live #EXTINF:-1 tvg-id="XTVChachapoyas.pe" status="online",X TV (Chachapoyas) (720p) [Not 24/7] https://tv.oyotunstream.com:1936/xtv/xtv/playlist.m3u8 #EXTINF:-1 tvg-id="" status="blocked",MX Old From 8befe554c868024e5d68af22ecd4620534601e86 Mon Sep 17 00:00:00 2001 From: Diego <5572928+sguinetti@users.noreply.github.com> Date: Fri, 12 Aug 2022 14:39:02 -0500 Subject: [PATCH 2/5] Update pe.m3u Rename as Congreso TV --- streams/pe.m3u | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streams/pe.m3u b/streams/pe.m3u index 801f1177fe..57518aa40f 100644 --- a/streams/pe.m3u +++ b/streams/pe.m3u @@ -443,7 +443,7 @@ https://live.obslivestream.com/vztv/index.m3u8 http://free.fullspeed.tv/iptv-query?streaming-ip=https://www.dailymotion.com/WillaxTV #EXTINF:-1 tvg-id="Wtv.pe" status="error",Wtv (Bambamarca) (480p) [Not 24/7] https://tv.inka.net.pe/wtv/wtv/index.m3u8 -#EXTINF:-1 tvg-id="CongresodelaRepubllica.pe" status="online",Congreso de la Repúbllica [Not 24/7] +#EXTINF:-1 tvg-id="CongresoTV.pe" status="online",Congreso TV [Not 24/7] http://free.fullspeed.tv/iptv-query?streaming-ip=https://www.youtube.com/c/CongresodelaRep%C3%BAblicadelPer%C3%BATVenvivo/live #EXTINF:-1 tvg-id="XTVChachapoyas.pe" status="online",X TV (Chachapoyas) (720p) [Not 24/7] https://tv.oyotunstream.com:1936/xtv/xtv/playlist.m3u8 From 269dccbfbb1dbaf1286d5799b4ae2931cc571172 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 13 Aug 2022 20:43:30 +0300 Subject: [PATCH 3/5] Update streams.json --- tests/__data__/input/data/streams.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/__data__/input/data/streams.json b/tests/__data__/input/data/streams.json index 69f43a964f..f5b4f45bc0 100644 --- a/tests/__data__/input/data/streams.json +++ b/tests/__data__/input/data/streams.json @@ -1 +1 @@ -[{"channel":"LDPRTV.ru","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1920,"height":1080,"bitrate":6542556,"frame_rate":50,"added_at":"2022-07-07T00:00:00Z","checked_at":"2022-08-07T00:00:00Z","updated_at":"2022-08-07T00:00:00Z"},{"channel":"LibyasChannel.ly","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1024,"height":576,"bitrate":0,"frame_rate":25,"added_at":"2022-07-07T00:00:00Z","checked_at":"2022-07-07T00:00:00Z","updated_at":"2022-07-07T00:00:00Z"}] \ No newline at end of file +[{"channel":"AndorraTV.ad","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":"http://imn.iq","user_agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","status":"error","added_at":"2022-07-07T00:00:00Z","updated_at":"2022-08-07T00:00:00Z","checked_at":"2022-08-07T00:00:00Z"},{"channel":"LDPRTV.ru","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1920,"height":1080,"bitrate":6542556,"frame_rate":50,"added_at":"2022-07-07T00:00:00Z","checked_at":"2022-08-07T00:00:00Z","updated_at":"2022-08-07T00:00:00Z"},{"channel":"LibyasChannel.ly","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1024,"height":576,"bitrate":0,"frame_rate":25,"added_at":"2022-07-07T00:00:00Z","checked_at":"2022-07-07T00:00:00Z","updated_at":"2022-07-07T00:00:00Z"}] \ No newline at end of file From b7dfed21cda358bf2026ac7018c543ae6cc872de Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 13 Aug 2022 20:43:37 +0300 Subject: [PATCH 4/5] Update export.test.js --- tests/commands/database/export.test.js | 28 ++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/tests/commands/database/export.test.js b/tests/commands/database/export.test.js index 05a3364961..04fba3d36e 100644 --- a/tests/commands/database/export.test.js +++ b/tests/commands/database/export.test.js @@ -21,22 +21,34 @@ it('can create streams.json', () => { let output = content(`output/.api/streams.json`) let expected = content(`expected/.api/streams.json`) - const updatedUrl = 'https://master.starmena-cloud.com/hls/libyas.m3u8' - let outputData = output.find(i => i.url === updatedUrl) - let savedData = api.find(i => i.url === updatedUrl) + const samples = { + unchanged_online: 'https://master.starmena-cloud.com/hls/libyas.m3u8', + unchanged_error: 'https://iptv-all.lanesh4d0w.repl.co/andorra/atv', + updated_error: 'http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8', + added_online: 'https://master.starmena-cloud.com/hls/bbc.m3u8' + } + + let outputData, savedData + + outputData = output.find(i => i.url === samples['unchanged_online']) + savedData = api.find(i => i.url === samples['unchanged_online']) expect(outputData.added_at).toBe(savedData.added_at) expect(outputData.updated_at).toBe(savedData.updated_at) expect(dayjs().diff(outputData.checked_at, 'h')).toBe(0) - const sameUrl = 'http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8' - outputData = output.find(i => i.url === sameUrl) - savedData = api.find(i => i.url === sameUrl) + outputData = output.find(i => i.url === samples['unchanged_error']) + savedData = api.find(i => i.url === samples['unchanged_error']) + expect(outputData.added_at).toBe(savedData.added_at) + expect(outputData.updated_at).toBe(savedData.updated_at) + expect(dayjs().diff(outputData.checked_at, 'h')).toBe(0) + + outputData = output.find(i => i.url === samples['updated_error']) + savedData = api.find(i => i.url === samples['unchanged_error']) expect(outputData.added_at).toBe(savedData.added_at) expect(dayjs().diff(outputData.updated_at, 'h')).toBe(0) expect(dayjs().diff(outputData.checked_at, 'h')).toBe(0) - const addedUrl = 'https://master.starmena-cloud.com/hls/bbc.m3u8' - outputData = output.find(i => i.url === addedUrl) + outputData = output.find(i => i.url === samples['added_online']) expect(dayjs().diff(outputData.added_at, 'h')).toBe(0) expect(dayjs().diff(outputData.updated_at, 'h')).toBe(0) expect(dayjs().diff(outputData.checked_at, 'h')).toBe(0) From 864183dbe15b6a7f6313780f2db989015ef72160 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 13 Aug 2022 20:43:40 +0300 Subject: [PATCH 5/5] Update export.js --- scripts/commands/database/export.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/commands/database/export.js b/scripts/commands/database/export.js index 675a848479..9ce347f7b9 100644 --- a/scripts/commands/database/export.js +++ b/scripts/commands/database/export.js @@ -13,7 +13,7 @@ async function main() { let streams = await db.streams.find({}) streams = _.sortBy(streams, 'channel') streams = streams.map(stream => { - const data = { + let data = { channel: stream.channel, url: stream.url, http_referrer: stream.http_referrer, @@ -29,6 +29,7 @@ async function main() { let updatedAt = now let found = api.streams.find({ url: stream.url }) if (found) { + data = JSON.parse(JSON.stringify(data)) normalized = _.omit(found, ['added_at', 'updated_at', 'checked_at']) if (_.isEqual(data, normalized)) { addedAt = found.added_at || now