From c87aa8671cd6d4a2d48248c27bfd8aca9c62ccee Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 10 Oct 2018 19:47:51 -0500 Subject: [PATCH] Add fix for continuation on playlists smaller than 100 videos --- src/invidious/playlists.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index b75a32932..4e9d837ba 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -65,6 +65,11 @@ def fetch_playlist_videos(plid, page, video_count, continuation = nil) nodeset = document.xpath_nodes(%q(.//tr[contains(@class, "pl-video")])) videos = extract_playlist(plid, nodeset, 0) + if continuation + until videos[0].id == continuation + videos.shift + end + end end end