corrected video quality issue
This commit is contained in:
parent
58cca7afca
commit
69af1f42c6
1 changed files with 12 additions and 10 deletions
|
@ -42,16 +42,18 @@ proc parseThumbs(content: string): seq[string] =
|
||||||
return thumbs
|
return thumbs
|
||||||
|
|
||||||
proc setUpVideo(content: string, video_uri: string): (string, Urls, Thumbs) =
|
proc setUpVideo(content: string, video_uri: string): (string, Urls, Thumbs) =
|
||||||
let rel_vids_re = re"""video_related=(.+)"""
|
let
|
||||||
let vid_url_re = re"""setVideoUrl(High|Low)(.*)"""
|
rel_vids_re = re"""video_related=(.+)"""
|
||||||
let vid_hls_re = re"""setVideoHLS(.*)"""
|
vid_h_url_re = re"""setVideoUrlHigh(.*)"""
|
||||||
let vid_thumb_re = re"""setThumbUrl(.*)"""
|
vid_l_url_re = re"""setVideoUrlLow(.*)"""
|
||||||
let related_vids = collect:
|
vid_hls_re = re"""setVideoHLS(.*)"""
|
||||||
for vid in content.findAll(rel_vids_re):
|
vid_thumb_re = re"""setThumbUrl(.*)"""
|
||||||
vid.replace(",","\n")
|
related_vids = collect:
|
||||||
let videos = content.findAll(vid_url_re)
|
for vid in content.findAll(rel_vids_re):
|
||||||
var video = videos[0].split("'")[1]
|
vid.replace(",","\n")
|
||||||
let video_low = videos[1].split("'")[1]
|
|
||||||
|
var video = content.findAll(vid_h_url_re)[0].split("'")[1]
|
||||||
|
let video_low = content.findAll(vid_l_url_re)[0].split("'")[1]
|
||||||
var video_hls: string
|
var video_hls: string
|
||||||
var video_hls_matches = content.findAll(vid_hls_re)
|
var video_hls_matches = content.findAll(vid_hls_re)
|
||||||
if video_hls_matches.len > 0:
|
if video_hls_matches.len > 0:
|
||||||
|
|
Loading…
Reference in a new issue