mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
use dig for getting the video index
This commit is contained in:
parent
62dc629337
commit
e3df9f9ead
1 changed files with 1 additions and 1 deletions
|
@ -439,7 +439,7 @@ def get_playlist_videos(db, playlist, offset, locale = nil, continuation = nil)
|
|||
else
|
||||
if continuation
|
||||
initial_data = request_youtube_api_next(continuation, playlist.id)
|
||||
offset = initial_data["contents"]["twoColumnWatchNextResults"]["playlist"]["playlist"]["currentIndex"].as_i
|
||||
offset = initial_data.dig?("contents", "twoColumnWatchNextResults", "playlist", "playlist", "currentIndex").try &.as_i || offset
|
||||
end
|
||||
|
||||
videos = [] of PlaylistVideo
|
||||
|
|
Loading…
Reference in a new issue