From 687013c1b9ba57ab0d094520a12b36f50ca6a56a Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 20 Sep 2018 10:16:10 -0500 Subject: [PATCH] Add minor convenience features to search --- src/invidious.cr | 2 +- src/invidious/search.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index efc72b1e..789ce332 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -443,7 +443,7 @@ get "/search" do |env| operators = query.split(" ").select { |a| a.match(/\w+:[\w,]+/) } operators.each do |operator| - key, value = operator.split(":") + key, value = operator.downcase.split(":") case key when "channel", "user" diff --git a/src/invidious/search.cr b/src/invidious/search.cr index ecb33f9d..244f16fd 100644 --- a/src/invidious/search.cr +++ b/src/invidious/search.cr @@ -169,7 +169,7 @@ def produce_search_params(sort : String = "relevance", date : String = "", conte "\x30\x01" when "3d" "\x38\x01" - when "live" + when "live", "livestream" "\x40\x01" when "purchased" "\x48\x01"