Update get_artist to work with MPLA IDs now returned by get_library_artists (closes #117)
This commit is contained in:
parent
ee6e06690e
commit
cfdb040652
2 changed files with 3 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ class TestYTMusic(unittest.TestCase):
|
|||
self.assertGreater(len(results), 20)
|
||||
|
||||
def test_get_artist(self):
|
||||
results = youtube.get_artist("UCmMUZbaYdNH0bEd1PAlAqsA")
|
||||
results = youtube.get_artist("MPLAUCmMUZbaYdNH0bEd1PAlAqsA")
|
||||
self.assertEqual(len(results), 11)
|
||||
results = youtube.get_artist("UCLZ7tlKC06ResyDmEStSrOw") # no album year
|
||||
self.assertGreaterEqual(len(results), 9)
|
||||
|
|
|
|||
|
|
@ -201,6 +201,8 @@ class BrowsingMixin:
|
|||
}
|
||||
}
|
||||
"""
|
||||
if channelId.startswith("MPLA"):
|
||||
channelId = channelId[4:]
|
||||
body = prepare_browse_endpoint("ARTIST", channelId)
|
||||
endpoint = 'browse'
|
||||
response = self._send_request(endpoint, body)
|
||||
|
|
|
|||
Loading…
Reference in a new issue