From 6adbcd050c1932963973fda077d4332cea84f049 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 11 Feb 2018 17:01:32 -0600 Subject: [PATCH] Clarify listen param and update icon --- src/invidious.cr | 6 +++++- src/views/watch.ecr | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 417472a1..b54630fd 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -147,9 +147,13 @@ end get "/watch" do |env| id = env.params.query["v"] - listen = env.params.query["listen"]? || "false" + if env.params.query["listen"]? && env.params.query["listen"] == "true" + listen = true env.params.query.delete_all("listen") + else + listen = false + end client = get_client(pool) begin diff --git a/src/views/watch.ecr b/src/views/watch.ecr index f727c4a9..bdbf4b92 100644 --- a/src/views/watch.ecr +++ b/src/views/watch.ecr @@ -5,7 +5,7 @@ <%= video.title %> - Invidious <% end %> -<% if listen == "true" %> +<% if listen %>