get_watch_playlist: recognize audioPlaylistIds as playlists to not error on continuations (#246)
This commit is contained in:
parent
2aad7232f2
commit
878ae9a9bf
2 changed files with 4 additions and 1 deletions
|
|
@ -175,6 +175,8 @@ class TestYTMusic(unittest.TestCase):
|
|||
###############
|
||||
|
||||
def test_get_watch_playlist(self):
|
||||
playlist = self.yt_auth.get_watch_playlist(playlistId="OLAK5uy_ln_o1YXFqK4nfiNuTfhJK2XcRNCxml0fY", limit=90)
|
||||
self.assertGreaterEqual(len(playlist['tracks']), 90)
|
||||
playlist = self.yt_auth.get_watch_playlist("9mWr4c_ig54", limit=50)
|
||||
self.assertGreater(len(playlist['tracks']), 45)
|
||||
playlist = self.yt_auth.get_watch_playlist("UoAf_y9Ok4k") # private track
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ class WatchMixin:
|
|||
}
|
||||
}
|
||||
body['playlistId'] = validate_playlist_id(playlistId)
|
||||
is_playlist = body['playlistId'].startswith('PL')
|
||||
is_playlist = body['playlistId'].startswith('PL') or \
|
||||
body['playlistId'].startswith('OLA')
|
||||
if params:
|
||||
body['params'] = params
|
||||
endpoint = 'next'
|
||||
|
|
|
|||
Loading…
Reference in a new issue