diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e61de2e49..6b377ccf2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -13,10 +13,10 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 2 - - uses: tj-actions/changed-files@v12.2 + - uses: tj-actions/changed-files@v22.2 id: files with: - files: 'streams' + files: streams/*.m3u - uses: actions/setup-node@v2 if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }} with: diff --git a/package-lock.json b/package-lock.json index e83baeced..d2761ffff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "commander": "^8.3.0", "dayjs": "^1.10.7", "fs-extra": "^10.0.0", - "iptv-checker": "^0.24.2", + "iptv-checker": "^0.24.3", "iptv-playlist-parser": "^0.11.0", "jest": "^27.5.1", "jest-expect-message": "^1.0.2", @@ -2006,9 +2006,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/iptv-checker": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.24.2.tgz", - "integrity": "sha512-a3omcqX6rW5UK5pM2Cnvuw3K5mFyjfKEMMjdXM8L9dZnYs/9AFL6X9d2wjacaAY8vUyOdUoKr/Hbq0OkDW2tTg==", + "version": "0.24.3", + "resolved": "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.24.3.tgz", + "integrity": "sha512-9d3qAn38HOc0IVokoSpusTEFLYW1UWZfCODzydduvY8QVn4+HU7g+X8Jl/cVgyQTxDJPODLUGMV3Y6rBy/aSoA==", "dependencies": { "axios": "^0.21.1", "axios-curlirize": "^1.3.7", @@ -5742,9 +5742,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "iptv-checker": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.24.2.tgz", - "integrity": "sha512-a3omcqX6rW5UK5pM2Cnvuw3K5mFyjfKEMMjdXM8L9dZnYs/9AFL6X9d2wjacaAY8vUyOdUoKr/Hbq0OkDW2tTg==", + "version": "0.24.3", + "resolved": "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.24.3.tgz", + "integrity": "sha512-9d3qAn38HOc0IVokoSpusTEFLYW1UWZfCODzydduvY8QVn4+HU7g+X8Jl/cVgyQTxDJPODLUGMV3Y6rBy/aSoA==", "requires": { "axios": "^0.21.1", "axios-curlirize": "^1.3.7", diff --git a/package.json b/package.json index 86295c812..860ffc831 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "commander": "^8.3.0", "dayjs": "^1.10.7", "fs-extra": "^10.0.0", - "iptv-checker": "^0.24.2", + "iptv-checker": "^0.24.3", "iptv-playlist-parser": "^0.11.0", "jest": "^27.5.1", "jest-expect-message": "^1.0.2", diff --git a/scripts/commands/database/export.js b/scripts/commands/database/export.js index ccdfaa7d1..12990a082 100644 --- a/scripts/commands/database/export.js +++ b/scripts/commands/database/export.js @@ -16,7 +16,8 @@ async function main() { status: stream.status, width: stream.width, height: stream.height, - bitrate: stream.bitrate + bitrate: stream.bitrate, + frame_rate: stream.frame_rate } }) diff --git a/scripts/commands/database/update.js b/scripts/commands/database/update.js index 576a56622..99c55c666 100644 --- a/scripts/commands/database/update.js +++ b/scripts/commands/database/update.js @@ -27,10 +27,11 @@ async function updateStreams(items = [], results = {}, origins = {}) { stream.set('status', { status }) if (result.streams.length) { - const { width, height, bitrate } = parseMediaInfo(result.streams) + const { width, height, bitrate, frame_rate } = parseMediaInfo(result.streams) stream.set('width', { width }) stream.set('height', { height }) stream.set('bitrate', { bitrate }) + stream.set('frame_rate', { frame_rate }) } if (result.requests.length) { @@ -124,19 +125,22 @@ function findOrigin(requests = [], origins = {}) { function parseMediaInfo(streams) { streams = streams.filter(s => s.codec_type === 'video') - streams = _.orderBy( - streams, - ['height', s => (s.tags && s.tags.variant_bitrate ? parseInt(s.tags.variant_bitrate) : 0)], - ['desc', 'desc'] - ) - - const data = _.head(streams) - if (data) { - const bitrate = data.tags && data.tags.variant_bitrate ? parseInt(data.tags.variant_bitrate) : 0 - return { width: data.width, height: data.height, bitrate } - } + streams = streams.map(s => { + s.bitrate = s.tags && s.tags.variant_bitrate ? parseInt(s.tags.variant_bitrate) : 0 + s.frame_rate = parseFrameRate(s.avg_frame_rate) + + return s + }) + streams = _.orderBy(streams, ['height', 'bitrate'], ['desc', 'desc']) + + return _.head(streams) || {} +} + +function parseFrameRate(frame_rate = '0/0') { + const parts = frame_rate.split('/') + const number = parseInt(parts[0]) / parseInt(parts[1]) - return {} + return number > 0 ? Math.round(number * 100) / 100 : 0 } function parseStatus(error) { diff --git a/scripts/commands/playlist/generate.js b/scripts/commands/playlist/generate.js index f34f16114..4e26c1bb3 100644 --- a/scripts/commands/playlist/generate.js +++ b/scripts/commands/playlist/generate.js @@ -36,8 +36,8 @@ async function loadStreams() { const levels = { online: 1, blocked: 2, timeout: 3, error: 4, default: 5 } streams = orderBy( streams, - ['channel', s => levels[s.status] || levels['default'], 'height', 'url'], - ['asc', 'asc', 'desc', 'asc'] + ['channel', s => levels[s.status] || levels['default'], 'height', 'frame_rate', 'url'], + ['asc', 'asc', 'desc', 'desc', 'asc'] ) streams = _.uniqBy(streams, stream => stream.channel || _.uniqueId()) diff --git a/scripts/commands/playlist/update.js b/scripts/commands/playlist/update.js index d2a4a0028..40418500d 100644 --- a/scripts/commands/playlist/update.js +++ b/scripts/commands/playlist/update.js @@ -9,8 +9,8 @@ async function main() { const levels = { online: 1, blocked: 2, timeout: 3, error: 4, default: 5 } streams = orderBy( streams, - ['channel', s => levels[s.status] || levels['default'], 'height', 'url'], - ['asc', 'asc', 'desc', 'asc'] + ['channel', s => levels[s.status] || levels['default'], 'height', 'frame_rate', 'url'], + ['asc', 'asc', 'desc', 'desc', 'asc'] ) const files = _.groupBy(streams, 'filepath') diff --git a/tests/__data__/expected/.api/streams.json b/tests/__data__/expected/.api/streams.json index bf8b03b6b..fd650e326 100644 --- a/tests/__data__/expected/.api/streams.json +++ b/tests/__data__/expected/.api/streams.json @@ -1 +1 @@ -[{"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"},{"channel":"BBCNews.uk","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"status":"blocked"},{"channel":"BBCNewsHD.ad","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1024,"height":576,"bitrate":0},{"channel":"KayhanTV.af","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"LDPRTV.ru","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"Sharq.af","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1280,"height":720,"bitrate":2226543}] \ 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"},{"channel":"BBCNews.uk","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"status":"blocked"},{"channel":"BBCNewsHD.ad","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},{"channel":"KayhanTV.af","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"LDPRTV.ru","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"Sharq.af","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1280,"height":720,"bitrate":2226543,"frame_rate":25}] \ No newline at end of file diff --git a/tests/__data__/expected/.gh-pages/categories/xxx.m3u b/tests/__data__/expected/.gh-pages/categories/xxx.m3u index 3c9f990fc..405baf7e5 100644 --- a/tests/__data__/expected/.gh-pages/categories/xxx.m3u +++ b/tests/__data__/expected/.gh-pages/categories/xxx.m3u @@ -1,3 +1,3 @@ #EXTM3U x-tvg-url="" #EXTINF:-1 tvg-id="VisitXTV.nl" tvg-country="INT" tvg-language="Flemish" tvg-logo="https://i.imgur.com/RJ9wbNF.jpg" group-title="XXX",Visit-X TV -https://stream.visit-x.tv/vxtv/ngrp:live_all/playlist.m3u8 +https://stream.visit-x.tv/vxtv/ngrp:live_all/60fps.m3u8 diff --git a/tests/__data__/expected/.gh-pages/index.nsfw.m3u b/tests/__data__/expected/.gh-pages/index.nsfw.m3u index b8edd3f40..3b130e3e5 100644 --- a/tests/__data__/expected/.gh-pages/index.nsfw.m3u +++ b/tests/__data__/expected/.gh-pages/index.nsfw.m3u @@ -12,7 +12,7 @@ http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8 #EXTINF:-1 tvg-id="" tvg-country="" tvg-language="" tvg-logo="" group-title="Undefined",Tastemade https://tastemade-freetv16min-plex.amagi.tv/hls/amagi_hls_data_tastemade-tastemadefreetv16-plex/CDN/playlist.m3u8 #EXTINF:-1 tvg-id="VisitXTV.nl" tvg-country="INT" tvg-language="Flemish" tvg-logo="https://i.imgur.com/RJ9wbNF.jpg" group-title="XXX",Visit-X TV -https://stream.visit-x.tv/vxtv/ngrp:live_all/playlist.m3u8 +https://stream.visit-x.tv/vxtv/ngrp:live_all/60fps.m3u8 #EXTINF:-1 tvg-id="Zoo.ad" tvg-country="AD" tvg-language="" tvg-logo="" group-title="Undefined",Zoo (720p) https://iptv-all.lanesh4d0w.repl.co/andorra/zoo #EXTINF:-1 tvg-id="LDPRTV.ru" tvg-country="RU" tvg-language="Russian" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="General",ЛДПР ТВ (1080p) diff --git a/tests/__data__/expected/database/db_update.streams.db b/tests/__data__/expected/database/db_update.streams.db index 8accfabc3..0181c493c 100644 --- a/tests/__data__/expected/database/db_update.streams.db +++ b/tests/__data__/expected/database/db_update.streams.db @@ -1,6 +1,6 @@ {"title":"ЛДПР ТВ","channel":"LDPRTV.ru","filepath":"tests/__data__/output/streams/ru.m3u","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"2ST8btby3mmsgPF0","status":"timeout"} {"title":"BBC News HD","channel":"BBCNews.uk","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"cluster_id":3,"_id":"3TbieV1ptnZVCIdn","status":"blocked"} {"title":"ATV","channel":"AndorraTV.ad","filepath":"tests/__data__/output/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"I6cjG2xCBRFFP4sz","status":"error"} -{"title":"BBC News HD","channel":"BBCNewsHD.ad","filepath":"tests/__data__/output/streams/uk.m3u","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"cluster_id":3,"_id":"WTbieV1ptnZVCIdn","status":"online","bitrate":0,"width":1024,"height":576} +{"title":"BBC News HD","channel":"BBCNewsHD.ad","filepath":"tests/__data__/output/streams/uk.m3u","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"cluster_id":3,"_id":"WTbieV1ptnZVCIdn","status":"online","bitrate":0,"frame_rate":29.97,"width":1024,"height":576} {"title":"Kayhan TV","channel":"KayhanTV.af","filepath":"channels/af.m3u","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"cFFpFVzSn6xFMUF3","status":"error"} -{"title":"Sharq","channel":"Sharq.af","filepath":"channels/af.m3u","bitrate":2226543,"width":1280,"height":720,"url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"u7iyA6cjtf1iWWAZ","status":"online"} +{"title":"Sharq","channel":"Sharq.af","filepath":"channels/af.m3u","bitrate":2226543,"frame_rate":25,"width":1280,"height":720,"url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"u7iyA6cjtf1iWWAZ","status":"online"} diff --git a/tests/__data__/expected/streams/nl.m3u b/tests/__data__/expected/streams/nl.m3u index 9eb8385bc..c0a1ed14a 100644 --- a/tests/__data__/expected/streams/nl.m3u +++ b/tests/__data__/expected/streams/nl.m3u @@ -1,6 +1,8 @@ #EXTM3U #EXTINF:-1 tvg-id="NPO1.nl" status="blocked",NPO 1 (1080p) [Geo-blocked] -http://stream.tvtap.net:8081/live/nl-npo1.stream/playlist.m3u8 +http://stream.tvtap.net:8081/live/nl-npo1.stream/60fps.m3u8 +#EXTINF:-1 tvg-id="NPO1.nl" status="blocked",NPO 1 (1080p) [Geo-blocked] +http://stream.tvtap.net:8081/live/nl-npo1.stream/30fps.m3u8 #EXTINF:-1 tvg-id="NPO1.nl" status="error",NPO 1 (342p) [Geo-blocked] http://resolver.streaming.api.nos.nl/livestream?url=/live/npo/tvlive/npo1/npo1.isml/.m3u8 #EXTINF:-1 tvg-id="NPO2.nl" status="online",NPO 2 (342p) diff --git a/tests/__data__/input/database/db_export.streams.db b/tests/__data__/input/database/db_export.streams.db index 0ba48c9e2..1c4b73c92 100644 --- a/tests/__data__/input/database/db_export.streams.db +++ b/tests/__data__/input/database/db_export.streams.db @@ -1,6 +1,6 @@ {"title":"ЛДПР ТВ","channel":"LDPRTV.ru","filepath":"tests/__data__/output/streams/ru.m3u","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"2ST8btby3mmsgPF0","status":"error"} {"title":"BBC News HD","channel":"BBCNews.uk","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"cluster_id":3,"_id":"3TbieV1ptnZVCIdn","status":"blocked"} {"title":"ATV","channel":"AndorraTV.ad","filepath":"tests/__data__/output/streams/ad.m3u","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","cluster_id":1,"_id":"I6cjG2xCBRFFP4sz","status":"error"} -{"title":"BBC News HD","channel":"BBCNewsHD.ad","filepath":"tests/__data__/output/streams/uk.m3u","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"cluster_id":3,"_id":"WTbieV1ptnZVCIdn","status":"online","bitrate":0,"width":1024,"height":576} +{"title":"BBC News HD","channel":"BBCNewsHD.ad","filepath":"tests/__data__/output/streams/uk.m3u","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"cluster_id":3,"_id":"WTbieV1ptnZVCIdn","status":"online","bitrate":0,"frame_rate":25,"width":1024,"height":576} {"title":"Kayhan TV","channel":"KayhanTV.af","filepath":"channels/af.m3u","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"cFFpFVzSn6xFMUF3","status":"error"} -{"title":"Sharq","channel":"Sharq.af","filepath":"channels/af.m3u","bitrate":2226543,"width":1280,"height":720,"url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"u7iyA6cjtf1iWWAZ","status":"online"} +{"title":"Sharq","channel":"Sharq.af","filepath":"channels/af.m3u","bitrate":2226543,"frame_rate":25,"width":1280,"height":720,"url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"u7iyA6cjtf1iWWAZ","status":"online"} diff --git a/tests/__data__/input/database/playlist_generate.streams.db b/tests/__data__/input/database/playlist_generate.streams.db index 2d9f1153a..295044794 100644 --- a/tests/__data__/input/database/playlist_generate.streams.db +++ b/tests/__data__/input/database/playlist_generate.streams.db @@ -6,7 +6,8 @@ {"title":"BBC News HD","channel":"BBCNews.uk","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"status":"online","cluster_id":3,"_id":"3TbieV1ptnZVCIdn"} {"title":"ATV","channel":"AndorraTV.ad","filepath":"tests/__data__/output/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":null,"user_agent":null,"height":720,"width":1280,"status":"error","cluster_id":1,"_id":"I6cjG2xCBRFFP44z"} {"title":"Andorra TV (720p) [Not 24/7]","channel":"","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8","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","height":720,"width":1280,"status":"online","cluster_id":3,"_id":"WTbieV1ptnZVCIdn"} -{"title":"Visit-X TV","channel":"VisitXTV.nl","filepath":"tests/__data__/output/streams/nl.m3u","url":"https://stream.visit-x.tv/vxtv/ngrp:live_all/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","cluster_id":1,"_id":"2ST8btby3mmsgPF5"} +{"title":"Visit-X TV","channel":"VisitXTV.nl","filepath":"tests/__data__/output/streams/nl.m3u","url":"https://stream.visit-x.tv/vxtv/ngrp:live_all/30fps.m3u8","frame_rate":30,"http_referrer":null,"user_agent":null,"status":"online","cluster_id":1,"_id":"2ST8btby3mmsgPF5"} +{"title":"Visit-X TV","channel":"VisitXTV.nl","filepath":"tests/__data__/output/streams/nl.m3u","url":"https://stream.visit-x.tv/vxtv/ngrp:live_all/60fps.m3u8","frame_rate":60,"http_referrer":null,"user_agent":null,"status":"online","cluster_id":1,"_id":"2ST8btby3mmsgPF6"} {"title":"Tastemade","channel":"","filepath":"tests/__data__/output/streams/unsorted.m3u","url":"https://tastemade-freetv16min-plex.amagi.tv/hls/amagi_hls_data_tastemade-tastemadefreetv16-plex/CDN/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","cluster_id":1,"_id":"2ST8btby3mmsgPAB"} {"title":"Supra","channel":"","filepath":"tests/__data__/output/streams/unsorted.m3u","url":"https://www.youtube.com/watch?v=dzShOMiH1FY","http_referrer":null,"user_agent":null,"status":"error","cluster_id":1,"_id":"2ST8btby3mmsg5AB"} {"title":"Daawah TV","channel":"","filepath":"tests/__data__/output/streams/in.m3u","url":"http://51.15.246.58:8081/daawahtv/daawahtv2/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","cluster_id":1,"_id":"2ST8btby3mmsgPF9"} diff --git a/tests/__data__/input/database/playlist_update.streams.db b/tests/__data__/input/database/playlist_update.streams.db index c6be2c056..4eccc954c 100644 --- a/tests/__data__/input/database/playlist_update.streams.db +++ b/tests/__data__/input/database/playlist_update.streams.db @@ -8,6 +8,7 @@ {"title":"Kayhan TV","channel":"KayhanTV.af","filepath":"tests/__data__/output/streams/af.m3u","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"cluster_id":1,"status":"blocked","_id":"cFFpFVzSn6xFMUF3"} {"title":"Sharq","channel":"Sharq.af","filepath":"tests/__data__/output/streams/af.m3u","url":"http://51.210.199.50/hls/stream.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"cluster_id":1,"status":"online","_id":"u7iyA6cjtf1iWWAZ"} {"channel":"NPO1.nl","title":"NPO 1 (342p) [Geo-blocked]","filepath":"tests/__data__/output/streams/nl.m3u","url":"http://resolver.streaming.api.nos.nl/livestream?url=/live/npo/tvlive/npo1/npo1.isml/.m3u8","http_referrer":null,"user_agent":null,"cluster_id":68,"status":"error","_id":"mvUyDVuS5gc8gLJV"} -{"channel":"NPO1.nl","title":"NPO 1 (1080p) [Geo-blocked]","filepath":"tests/__data__/output/streams/nl.m3u","url":"http://stream.tvtap.net:8081/live/nl-npo1.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":255,"status":"blocked","_id":"8WVbsxsYeOL7kHQl"} +{"channel":"NPO1.nl","title":"NPO 1 (1080p) [Geo-blocked]","filepath":"tests/__data__/output/streams/nl.m3u","url":"http://stream.tvtap.net:8081/live/nl-npo1.stream/30fps.m3u8","http_referrer":null,"user_agent":null,"cluster_id":255,"status":"blocked","frame_rate":30,"_id":"8WVbsxsYeOL7kHQl"} +{"channel":"NPO1.nl","title":"NPO 1 (1080p) [Geo-blocked]","filepath":"tests/__data__/output/streams/nl.m3u","url":"http://stream.tvtap.net:8081/live/nl-npo1.stream/60fps.m3u8","http_referrer":null,"user_agent":null,"cluster_id":255,"status":"blocked","frame_rate":60,"_id":"8WVbsxsYeOL7kHQB"} {"channel":"NPO2.nl","title":"NPO 2 (342p)","filepath":"tests/__data__/output/streams/nl.m3u","url":"http://resolver.streaming.api.nos.nl/livestream?url=/live/npo/tvlive/npo2/npo2.isml/.m3u8","http_referrer":null,"user_agent":null,"cluster_id":175,"status":"online","_id":"2p1TNGO0mF0MJOGy"} {"channel":"NPO2.nl","title":"NPO 2 (302p) [Geo-blocked]","filepath":"tests/__data__/output/streams/nl.m3u","url":"http://stream.tvtap.net:8081/live/nl-npo2.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":191,"status":"blocked","_id":"nhL85BL7YM5OR7cn"} diff --git a/tests/__data__/input/logs/cluster/load/cluster_1.log b/tests/__data__/input/logs/cluster/load/cluster_1.log index 5a72cec8e..7aaa16d1d 100644 --- a/tests/__data__/input/logs/cluster/load/cluster_1.log +++ b/tests/__data__/input/logs/cluster/load/cluster_1.log @@ -3,4 +3,4 @@ {"_id":"3TbieV1ptnZVCIdn","error":{"code":"HTTP_FORBIDDEN","message":"HTTP 403 Forbidden"},"streams":[],"requests":[]} {"_id":"cFFpFVzSn6xFMUF3","error":{"code":"HTTP_NOT_FOUND","message":"HTTP 404 Not Found"},"streams":[],"requests":[]} {"_id":"u7iyA6cjtf1iWWAZ","error":null,"streams":[{"index":0,"codec_name":"timed_id3","codec_long_name":"timed ID3 metadata","codec_type":"data","codec_tag_string":"ID3 ","codec_tag":"0x20334449","r_frame_rate":"0/0","avg_frame_rate":"0/0","time_base":"1/90000","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"1226543"}},{"index":1,"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile":"Constrained Baseline","codec_type":"video","codec_tag_string":"[27][0][0][0]","codec_tag":"0x001b","width":1280,"height":720,"coded_width":1280,"coded_height":720,"closed_captions":0,"has_b_frames":3,"sample_aspect_ratio":"1:1","display_aspect_ratio":"16:9","pix_fmt":"yuv420p","level":31,"color_range":"tv","chroma_location":"left","refs":1,"is_avc":"false","nal_length_size":"0","r_frame_rate":"25/1","avg_frame_rate":"25/1","time_base":"1/90000","start_pts":5612807216,"start_time":"62364.524622","bits_per_raw_sample":"8","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"726543"}},{"index":2,"codec_name":"aac","codec_long_name":"AAC (Advanced Audio Coding)","profile":"LC","codec_type":"audio","codec_tag_string":"[15][0][0][0]","codec_tag":"0x000f","sample_fmt":"fltp","sample_rate":"48000","channels":2,"channel_layout":"stereo","bits_per_sample":0,"r_frame_rate":"0/0","avg_frame_rate":"0/0","time_base":"1/90000","start_pts":5612806046,"start_time":"62364.511622","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"1226543"}},{"index":3,"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile":"Constrained Baseline","codec_type":"video","codec_tag_string":"[27][0][0][0]","codec_tag":"0x001b","width":1280,"height":720,"coded_width":1280,"coded_height":720,"closed_captions":0,"has_b_frames":3,"sample_aspect_ratio":"1:1","display_aspect_ratio":"16:9","pix_fmt":"yuv420p","level":31,"color_range":"tv","chroma_location":"left","refs":1,"is_avc":"false","nal_length_size":"0","r_frame_rate":"25/1","avg_frame_rate":"25/1","time_base":"1/90000","start_pts":5612807216,"start_time":"62364.524622","bits_per_raw_sample":"8","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"2226543"}}],"requests":[{"method":"GET","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"close","Host":"forerunnerrtmp.livestreamingcdn.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/chunklist_w2083911960.m3u8","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"forerunnerrtmp.livestreamingcdn.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/media_w2083911960_25312.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"forerunnerrtmp.livestreamingcdn.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/media_w2083911960_25313.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"forerunnerrtmp.livestreamingcdn.com","Icy-MetaData":"1"}}]} -{"_id":"WTbieV1ptnZVCIdn","error":null,"streams":[{"index":0,"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile":"Baseline","codec_type":"video","codec_tag_string":"[27][0][0][0]","codec_tag":"0x001b","width":1024,"height":576,"coded_width":1024,"coded_height":576,"closed_captions":0,"has_b_frames":0,"sample_aspect_ratio":"1:1","display_aspect_ratio":"16:9","pix_fmt":"yuv420p","level":31,"color_range":"tv","color_space":"bt709","color_transfer":"bt709","color_primaries":"bt709","chroma_location":"left","refs":1,"is_avc":"false","nal_length_size":"0","r_frame_rate":"25/1","avg_frame_rate":"25/1","time_base":"1/90000","start_pts":7878865078,"start_time":"87542.945311","bits_per_raw_sample":"8","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"0"}},{"index":1,"codec_name":"aac","codec_long_name":"AAC (Advanced Audio Coding)","profile":"HE-AAC","codec_type":"audio","codec_tag_string":"[15][0][0][0]","codec_tag":"0x000f","sample_fmt":"fltp","sample_rate":"48000","channels":2,"channel_layout":"stereo","bits_per_sample":0,"r_frame_rate":"0/0","avg_frame_rate":"0/0","time_base":"1/90000","start_pts":7878863698,"start_time":"87542.929978","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"0"}}],"requests":[{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"close","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas-432343.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas-432344.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}}]} \ No newline at end of file +{"_id":"WTbieV1ptnZVCIdn","error":null,"streams":[{"index":0,"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile":"Baseline","codec_type":"video","codec_tag_string":"[27][0][0][0]","codec_tag":"0x001b","width":1024,"height":576,"coded_width":1024,"coded_height":576,"closed_captions":0,"has_b_frames":0,"sample_aspect_ratio":"1:1","display_aspect_ratio":"16:9","pix_fmt":"yuv420p","level":31,"color_range":"tv","color_space":"bt709","color_transfer":"bt709","color_primaries":"bt709","chroma_location":"left","refs":1,"is_avc":"false","nal_length_size":"0","r_frame_rate":"1000/3","avg_frame_rate":"30000/1001","time_base":"1/90000","start_pts":7878865078,"start_time":"87542.945311","bits_per_raw_sample":"8","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"0"}},{"index":1,"codec_name":"aac","codec_long_name":"AAC (Advanced Audio Coding)","profile":"HE-AAC","codec_type":"audio","codec_tag_string":"[15][0][0][0]","codec_tag":"0x000f","sample_fmt":"fltp","sample_rate":"48000","channels":2,"channel_layout":"stereo","bits_per_sample":0,"r_frame_rate":"0/0","avg_frame_rate":"0/0","time_base":"1/90000","start_pts":7878863698,"start_time":"87542.929978","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"0"}}],"requests":[{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"close","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas-432343.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas-432344.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}}]} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 27fce904a..625f1c5ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1388,10 +1388,10 @@ "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" "version" "2.0.4" -"iptv-checker@^0.24.2": - "integrity" "sha512-a3omcqX6rW5UK5pM2Cnvuw3K5mFyjfKEMMjdXM8L9dZnYs/9AFL6X9d2wjacaAY8vUyOdUoKr/Hbq0OkDW2tTg==" - "resolved" "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.24.2.tgz" - "version" "0.24.2" +"iptv-checker@^0.24.3": + "integrity" "sha512-9d3qAn38HOc0IVokoSpusTEFLYW1UWZfCODzydduvY8QVn4+HU7g+X8Jl/cVgyQTxDJPODLUGMV3Y6rBy/aSoA==" + "resolved" "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.24.3.tgz" + "version" "0.24.3" dependencies: "axios" "^0.21.1" "axios-curlirize" "^1.3.7"