diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-02-26 14:31:37 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-02-26 14:31:37 -0600 |
| commit | 17b84f32df56f2df6849d13f3926bc20ad88081b (patch) | |
| tree | 4d9d26090a6e9a01eb43e5066b3fa9cfcc605f10 | |
| parent | a03958d937b778bd051bf3b646046b79761db75b (diff) | |
| download | invidious-17b84f32df56f2df6849d13f3926bc20ad88081b.tar.gz invidious-17b84f32df56f2df6849d13f3926bc20ad88081b.tar.bz2 invidious-17b84f32df56f2df6849d13f3926bc20ad88081b.zip | |
Fix duration in /api/v1/search
| -rw-r--r-- | src/invidious.cr | 2 | ||||
| -rw-r--r-- | src/invidious/search.cr | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index ce48f041..156e4cbf 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -3412,7 +3412,7 @@ get "/api/v1/search" do |env| date = env.params.query["date"]?.try &.downcase date ||= "" - duration = env.params.query["date"]?.try &.downcase + duration = env.params.query["duration"]?.try &.downcase duration ||= "" features = env.params.query["features"]?.try &.split(",").map { |feature| feature.downcase } diff --git a/src/invidious/search.cr b/src/invidious/search.cr index ce29abf2..ec97cf85 100644 --- a/src/invidious/search.cr +++ b/src/invidious/search.cr @@ -188,7 +188,7 @@ def produce_search_params(sort : String = "relevance", date : String = "", conte end end - if body.size > 0 + if !body.empty? token = head + "\x12" + body.size.unsafe_chr + body else token = head |
