From 93198438b81db0ba3ad3a33233eabdcd84152375 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Wed, 7 Apr 2021 15:13:41 +0200 Subject: [PATCH] Fix for issue #1989 Fixes #1989 --- src/invidious/playlists.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 71f6a9b8..073a9986 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -437,7 +437,8 @@ end def get_playlist_videos(db, playlist, offset, locale = nil, continuation = nil) # Show empy playlist if requested page is out of range - if offset >= playlist.video_count + # (e.g, when a new playlist has been created, offset will be negative) + if offset >= playlist.video_count || offset < 0 return [] of PlaylistVideo end