mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-10-31 04:32:02 +00:00 
			
		
		
		
	Fix duration in /api/v1/search
This commit is contained in:
		| @@ -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 } | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Omar Roth
					Omar Roth