mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Fix duration in /api/v1/search
This commit is contained in:
parent
a03958d937
commit
17b84f32df
2 changed files with 2 additions and 2 deletions
|
@ -3412,7 +3412,7 @@ get "/api/v1/search" do |env|
|
||||||
date = env.params.query["date"]?.try &.downcase
|
date = env.params.query["date"]?.try &.downcase
|
||||||
date ||= ""
|
date ||= ""
|
||||||
|
|
||||||
duration = env.params.query["date"]?.try &.downcase
|
duration = env.params.query["duration"]?.try &.downcase
|
||||||
duration ||= ""
|
duration ||= ""
|
||||||
|
|
||||||
features = env.params.query["features"]?.try &.split(",").map { |feature| feature.downcase }
|
features = env.params.query["features"]?.try &.split(",").map { |feature| feature.downcase }
|
||||||
|
|
|
@ -188,7 +188,7 @@ def produce_search_params(sort : String = "relevance", date : String = "", conte
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if body.size > 0
|
if !body.empty?
|
||||||
token = head + "\x12" + body.size.unsafe_chr + body
|
token = head + "\x12" + body.size.unsafe_chr + body
|
||||||
else
|
else
|
||||||
token = head
|
token = head
|
||||||
|
|
Loading…
Reference in a new issue