Update database/update.js
This commit is contained in:
parent
25cfecbbf9
commit
b3132150d7
|
@ -134,7 +134,7 @@ function findOrigin(requests = [], origins = {}) {
|
|||
|
||||
function parseStreams(streams) {
|
||||
streams = streams.filter(s => s.codec_type === 'video')
|
||||
streams = _.orderBy(streams, ['height', 'bitrate'], ['desc', 'desc'])
|
||||
streams = _.orderBy(streams, ['height', 'tags.variant_bitrate'], ['desc', 'desc'])
|
||||
|
||||
const data = _.head(streams)
|
||||
if (data) {
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
{"title":"ATV","channel":"AndorraTV.ad","filepath":"tests/__data__/output/channels/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":"","user_agent":"","cluster_id":1,"_id":"I6cjG2xCBRFFP4sz","is_online":false}
|
||||
{"title":"BBC News HD","channel":"BBCNewsHD.ad","filepath":"tests/__data__/output/channels/uk.m3u","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":"","user_agent":"","cluster_id":3,"_id":"WTbieV1ptnZVCIdn","is_online":true,"bitrate":0,"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":"","user_agent":"","cluster_id":1,"_id":"cFFpFVzSn6xFMUF3","is_online":false}
|
||||
{"title":"Sharq","channel":"Sharq.af","filepath":"channels/af.m3u","bitrate":1226543,"width":1280,"height":720,"url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":"","user_agent":"","cluster_id":1,"_id":"u7iyA6cjtf1iWWAZ","is_online":true}
|
||||
{"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":"","user_agent":"","cluster_id":1,"_id":"u7iyA6cjtf1iWWAZ","is_online":true}
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
{"_id":"I6cjG2xCBRFFP4sz","error":"No streams found","streams":[],"requests":[]}
|
||||
{"_id":"3TbieV1ptnZVCIdn","error":"Server returned 403 Forbidden (access denied)","streams":[],"requests":[]}
|
||||
{"_id":"cFFpFVzSn6xFMUF3","error":"Server returned 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":"1226543"}},{"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"}}],"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":"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":"1226543"}},{"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"}}]}
|
Loading…
Reference in New Issue