Update playlist/generate.js

This commit is contained in:
Aleksandr Statciuk 2022-02-14 02:21:54 +03:00
parent d3f6b824bd
commit 76f18168c4
2 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,8 @@ main()
async function loadStreams() {
await db.streams.load()
let streams = await db.streams.find({ status: { $in: ['online', 'timeout', 'blocked'] } })
let streams = await db.streams.find({})
streams = _.filter(streams, stream => stream.status !== 'error')
streams = orderBy(streams, ['channel', 'height', 'url'], ['asc', 'desc', 'asc'])
streams = _.uniqBy(streams, stream => stream.channel || _.uniqueId())

View File

@ -5,6 +5,7 @@
{"title":"Andorra TV (720p) [Not 24/7]","channel":"","filepath":"tests/__data__/output/channels/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"status":"online","cluster_id":3,"_id":"WTbieV1ptnZVCIdn"}
{"title":"Visit-X TV","channel":"VisitXTV.nl","filepath":"tests/__data__/output/channels/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":"Tastemade","channel":"","filepath":"tests/__data__/output/channels/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/channels/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/channels/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"}
{"title":"Meteomedia","channel":"MeteoMedia.ca","filepath":"tests/__data__/output/channels/in.m3u","url":"http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","cluster_id":1,"_id":"2ST8btby3mmsgP49"}
{"title":"Zoo (480p)","channel":"Zoo.ad","filepath":"tests/__data__/output/channels/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/zoo?480","http_referrer":null,"user_agent":null,"height":480,"width":640,"status":"online","cluster_id":1,"_id":"I6cjG2xCBRFFP4s3"}