summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-08-04 20:39:02 -0500
committerOmar Roth <omarroth@hotmail.com>2018-08-04 20:39:02 -0500
commit5d4198c700177283465bdb329dfad13059172de3 (patch)
tree8204cf3306ed8f7b049173851862f187d1011d31 /src
parent3b01bc673546384d4540e15e4633b09b94b9b936 (diff)
downloadinvidious-5d4198c700177283465bdb329dfad13059172de3.tar.gz
invidious-5d4198c700177283465bdb329dfad13059172de3.tar.bz2
invidious-5d4198c700177283465bdb329dfad13059172de3.zip
Acknowledge precedence for listen operator
Diffstat (limited to 'src')
-rw-r--r--src/invidious.cr5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 0eb334ab..9c273fd5 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -210,7 +210,6 @@ get "/watch" do |env|
if env.params.query["start"]?
video_start = decode_time(env.params.query["start"])
end
-
if env.params.query["t"]?
video_start = decode_time(env.params.query["t"])
end
@@ -221,7 +220,7 @@ get "/watch" do |env|
end
video_end ||= -1
- if env.params.query["listen"]? && env.params.query["listen"] == "true" || env.params.query["listen"] == "1"
+ if env.params.query["listen"]? && (env.params.query["listen"] == "true" || env.params.query["listen"] == "1")
listen = true
env.params.query.delete_all("listen")
end
@@ -381,7 +380,7 @@ get "/embed/:id" do |env|
end
video_end ||= -1
- if env.params.query["listen"]? && env.params.query["listen"] == "true" || env.params.query["listen"] == "1"
+ if env.params.query["listen"]? && (env.params.query["listen"] == "true" || env.params.query["listen"] == "1")
listen = true
env.params.query.delete_all("listen")
end