diff options
| author | diogo <diogo@riddleandcode.com> | 2021-08-09 09:36:44 +0200 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2021-10-11 23:49:08 +0200 |
| commit | c4c8a1050769a4ab25ab57ba62b96cf2b30fa6f9 (patch) | |
| tree | 42468c6677df8b13bd9271e097a1a13f06518269 | |
| parent | ee94ccdeb0097bc14dbde9ca945784c3a630347a (diff) | |
| download | invidious-c4c8a1050769a4ab25ab57ba62b96cf2b30fa6f9.tar.gz invidious-c4c8a1050769a4ab25ab57ba62b96cf2b30fa6f9.tar.bz2 invidious-c4c8a1050769a4ab25ab57ba62b96cf2b30fa6f9.zip | |
rename from continuation to video_id on get_playlist_videos
| -rw-r--r-- | src/invidious/playlists.cr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 7f80dc11..31b48fe8 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -426,7 +426,7 @@ def fetch_playlist(plid, locale) }) end -def get_playlist_videos(db, playlist, offset, locale = nil, continuation = nil) +def get_playlist_videos(db, playlist, offset, locale = nil, video_id = nil) # Show empy playlist if requested page is out of range # (e.g, when a new playlist has been created, offset will be negative) if offset >= playlist.video_count || offset < 0 @@ -437,9 +437,9 @@ def get_playlist_videos(db, playlist, offset, locale = nil, continuation = nil) db.query_all("SELECT * FROM playlist_videos WHERE plid = $1 ORDER BY array_position($2, index) LIMIT 100 OFFSET $3", playlist.id, playlist.index, offset, as: PlaylistVideo) else - if continuation + if video_id initial_data = YoutubeAPI.next({ - "videoId" => continuation, + "videoId" => video_id, "playlistId" => playlist.id, }) offset = initial_data.dig?("contents", "twoColumnWatchNextResults", "playlist", "playlist", "currentIndex").try &.as_i || offset |
