From f3c95666876603d5433b10680189edea351577bc Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 24 Dec 2018 17:47:23 -0600 Subject: [PATCH] Fix param ordering for fetch_playlist_videos --- src/invidious.cr | 2 +- src/invidious/playlists.cr | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index e166e599..362789b0 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -514,7 +514,7 @@ get "/playlist" do |env| end begin - videos = fetch_playlist_videos(plid, page, playlist.video_count, locale) + videos = fetch_playlist_videos(plid, page, playlist.video_count, locale: locale) rescue ex videos = [] of PlaylistVideo end diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 4dbbf5da..0f74b37a 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -65,6 +65,7 @@ def fetch_playlist_videos(plid, page, video_count, continuation = nil, locale = 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