diff --git a/pylast/__init__.py b/pylast/__init__.py index daa1efe..32a5540 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -1784,7 +1784,7 @@ class Album(_Opus): return _extract_tracks( self._request( - self.ws_prefix + ".getInfo", cacheable=True), "tracks") + self.ws_prefix + ".getInfo", cacheable=True), self.network) def get_url(self, domain_name=DOMAIN_ENGLISH): """Returns the URL of the album or track page on the network. diff --git a/tests/test_pylast.py b/tests/test_pylast.py index 45cbd8f..2ece3c8 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -1887,11 +1887,13 @@ class TestPyLast(unittest.TestCase): # Act tracks = album.get_tracks() + url = tracks[0].get_url() # Assert self.assertIsInstance(tracks, list) self.assertIsInstance(tracks[0], pylast.Track) self.assertEqual(len(tracks), 4) + self.assertTrue(url.startswith("https://www.last.fm/music/test")) @handle_lastfm_exceptions def test_tags(self):