summaryrefslogtreecommitdiffstats
path: root/src/invidious.cr
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2019-02-25 09:11:41 -0600
committerOmar Roth <omarroth@hotmail.com>2019-02-25 09:11:41 -0600
commit09d0972ab45227be66e3e3a29934c3378dc6dc1f (patch)
treed3e74f469eceb0c1ced066ac5a015deb13bcf4fa /src/invidious.cr
parent6b12449be4a8cf1015fd3ad93b3b90ec93dc0210 (diff)
downloadinvidious-0.14.1.tar.gz
invidious-0.14.1.tar.bz2
invidious-0.14.1.zip
Pull dash URL from player response0.14.1
Diffstat (limited to 'src/invidious.cr')
-rw-r--r--src/invidious.cr6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 3129f6d2..dda725ff 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -3735,8 +3735,8 @@ get "/api/manifest/dash/id/:id" do |env|
halt env, status_code: 403
end
- if video.info["dashmpd"]?
- manifest = client.get(video.info["dashmpd"]).body
+ if dashmpd = video.player_response["streamingData"]["dashManifestUrl"]?.try &.as_s
+ manifest = client.get(dashmpd).body
manifest = manifest.gsub(/<BaseURL>[^<]+<\/BaseURL>/) do |baseurl|
url = baseurl.lchop("<BaseURL>")
@@ -3993,7 +3993,7 @@ get "/videoplayback" do |env|
end
if response.status_code >= 400
- halt env, status_code: 403
+ halt env, status_code: response.status_code
end
client = make_client(URI.parse(host), proxies, region)