From 870ee1155394d8f3452609115e13a4e6fd4012b0 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 5 Aug 2018 17:07:17 -0500 Subject: [PATCH] Add fix for movies in search results --- src/invidious/search.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/invidious/search.cr b/src/invidious/search.cr index 1b1afbfb0..da104c6f5 100644 --- a/src/invidious/search.cr +++ b/src/invidious/search.cr @@ -47,6 +47,11 @@ def search(query, page = 1, search_params = build_search_params(content_type: "v if metadata.size == 0 next elsif metadata.size == 1 + # Skip movies + if metadata[0]["class"].includes? "ytd-movie-renderer" + next + end + view_count = metadata[0].content.split(" ")[0].delete(",").to_i64 published = Time.now else