Invidious is an alternative front-end to YouTube
Add fix to top_videos for empty database
Omar Roth89566233476b
diff --git a/src/invidious.cr b/src/invidious.crindex 9b0bb7a7..1ca461c7 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -118,9 +118,13 @@ spawn doclient = get_client(pool)args = [] of String- (1..top.size).each { |i| args << "($#{i})," }- args = args.join("")- args = args.chomp(",")+ if top.size > 0+ (1..top.size).each { |i| args << "($#{i})," }+ args = args.join("")+ args = args.chomp(",")+ else+ next+ endvideos = [] of Video