From af1823db8c984664364b9fe2710372e1b4f349a4 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 12 Apr 2019 07:29:47 -0500 Subject: [PATCH] Fix url in storyboards --- src/invidious.cr | 6 +++--- src/invidious/videos.cr | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 06812101..eaddf780 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -4230,9 +4230,9 @@ get "/latest_version" do |env| env.redirect "/api/v1/captions/#{id}?label=#{label}&title=#{title}" next else - itag = download_widget["itag"].as_s - local = "true" - end + itag = download_widget["itag"].as_s + local = "true" + end end id ||= env.params.query["id"]? diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 9e273a96..c72458b2 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -486,7 +486,7 @@ struct Video if storyboard = storyboards.try &.["spec"]? .try &.as_s return [{ - url: storyboard.split("#")[0].sub("M$M", "$N"), + url: storyboard.split("#")[0], width: 106, height: 60, count: -1, @@ -528,7 +528,7 @@ struct Video storyboard_height = storyboard_height.to_i items << { - url: "#{url}&sigh=#{sigh}".sub("$L", i), + url: "#{url}&sigh=#{sigh}".sub("$L", i).sub("$N", "M$M"), width: width, height: height, count: count,