From 0107b774f29b0f4cc0a7fabe546db347390337ec Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Fri, 28 Apr 2023 17:23:40 +0200 Subject: [PATCH] Trending: Don't extract items from categories --- src/invidious/trending.cr | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/invidious/trending.cr b/src/invidious/trending.cr index 134eb437..74bab1bd 100644 --- a/src/invidious/trending.cr +++ b/src/invidious/trending.cr @@ -17,7 +17,9 @@ def fetch_trending(trending_type, region, locale) client_config = YoutubeAPI::ClientConfig.new(region: region) initial_data = YoutubeAPI.browse("FEtrending", params: params, client_config: client_config) - trending = extract_videos(initial_data) - return {trending, plid} + items, _ = extract_items(initial_data) + + # Return items, but ignore categories (e.g featured content) + return items.reject!(Category), plid end