diff --git a/src/invidious.cr b/src/invidious.cr index 74cf8c170..f47ebda71 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -124,6 +124,9 @@ end get "/watch" do |env| id = env.params.query["v"] listen = env.params.query["listen"]? || "false" + speed = env.params.query["speed"]? && env.params.query["speed"].to_f? ? env.params.query["speed"].to_f : 1 + + env.params.query.delete_all("listen") begin video = get_video(id) @@ -172,7 +175,6 @@ end get "/search" do |env| query = env.params.query["q"] page = env.params.query["page"]? && env.params.query["page"].to_i? ? env.params.query["page"].to_i : 1 - speed = env.params.query["speed"]? && env.params.query["speed"].to_i? ? env.params.query["speed"].to_i : 1 client = get_client diff --git a/src/views/watch.ecr b/src/views/watch.ecr index 7a9e2efcf..f3763b563 100644 --- a/src/views/watch.ecr +++ b/src/views/watch.ecr @@ -2,7 +2,22 @@ <%= video.info["title"] + " - " %> <% end %> -