diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-02-18 11:43:57 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-02-18 11:43:57 -0600 |
| commit | f85472c0ce345b6adfc97c762317e3e9203eb6c9 (patch) | |
| tree | e41c337ecd1c122cc92bf68a0b6bcca33244e419 | |
| parent | 4933cd46d754587aa4b159af49f54e91611b44c3 (diff) | |
| download | invidious-f85472c0ce345b6adfc97c762317e3e9203eb6c9.tar.gz invidious-f85472c0ce345b6adfc97c762317e3e9203eb6c9.tar.bz2 invidious-f85472c0ce345b6adfc97c762317e3e9203eb6c9.zip | |
Fix extracting for mixes provided by YouTube Music
| -rw-r--r-- | src/invidious/mixes.cr | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/invidious/mixes.cr b/src/invidious/mixes.cr index a3ada869..c91e83a2 100644 --- a/src/invidious/mixes.cr +++ b/src/invidious/mixes.cr @@ -43,8 +43,10 @@ def fetch_mix(rdid, video_id, cookies = nil, locale = nil) mix_title = playlist["title"].as_s contents = playlist["contents"].as_a - until contents[0]["playlistPanelVideoRenderer"]["videoId"].as_s == video_id - contents.shift + if contents.map { |video| video["playlistPanelVideoRenderer"]["videoId"] }.includes? video_id + until contents[0]["playlistPanelVideoRenderer"]["videoId"].as_s == video_id + contents.shift + end end videos = [] of MixVideo |
