summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2022-02-03 03:55:43 +0100
committerGitHub <noreply@github.com>2022-02-03 03:55:43 +0100
commiteca8d2e7d72d142c7509f2f6cfb8f96a915bb77d (patch)
treed91db7bb39be54325162d5dc246108d39c5a4a1d /src
parent1ec15dc0736c193330ae9e1eeaff2ae3a5f9e890 (diff)
downloadinvidious-eca8d2e7d72d142c7509f2f6cfb8f96a915bb77d.tar.gz
invidious-eca8d2e7d72d142c7509f2f6cfb8f96a915bb77d.tar.bz2
invidious-eca8d2e7d72d142c7509f2f6cfb8f96a915bb77d.zip
Apply suggestions from code review
Co-authored-by: Matthew McGarvey <matthewmcgarvey14@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/invidious/videos.cr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
index 74e2746c..446e8e03 100644
--- a/src/invidious/videos.cr
+++ b/src/invidious/videos.cr
@@ -455,7 +455,7 @@ struct Video
qualities.each do |quality|
json.object do
- json.field "url", rv["author_thumbnail"].try &.gsub(/s\d+-/, "s#{quality}-")
+ json.field "url", rv["author_thumbnail"].gsub(/s\d+-/, "s#{quality}-")
json.field "width", quality
json.field "height", quality
end
@@ -944,7 +944,7 @@ def extract_video_info(video_id : String, proxy_region : String? = nil, context_
"endScreen", "watchNextEndScreenRenderer", "results"
)
- secondary_results.try &.as_a.each do |element|
+ player_overlays.try &.as_a.each do |element|
if item = element["endScreenVideoRenderer"]?
related_video = parse_related_video(item)
related << JSON::Any.new(related_video) if related_video