Skip to content

Invidious is an alternative front-end to YouTube

Add fix for continuation on playlists smaller than 100 videos

Omar Rothc87aa8671cd6
diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr
index b75a3293..4e9d837b 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