diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py index e02c764..2f527c0 100644 --- a/src/pylast/__init__.py +++ b/src/pylast/__init__.py @@ -1149,7 +1149,7 @@ class _BaseObject: def _get_things(self, method, thing, thing_type, params=None, cacheable=True): """Returns a list of the most played thing_types by this thing.""" - limit = params.get("limit", 1) + limit = params.get("limit", 50) seq = [] for node in _collect_nodes( limit, self, self.ws_prefix + "." + method, cacheable, params diff --git a/tests/test_artist.py b/tests/test_artist.py index 679d917..69dafb9 100755 --- a/tests/test_artist.py +++ b/tests/test_artist.py @@ -131,6 +131,17 @@ class TestPyLastArtist(TestPyLastWithLastFm): # Assert assert len(things) == 100 + def test_artist_top_albums_limit_default(self): + # Arrange + # Pick an artist with plenty of plays + artist = self.network.get_top_artists(limit=1)[0].item + + # Act + things = artist.get_top_albums() + + # Assert + assert len(things) == 50 + def test_artist_listener_count(self): # Arrange artist = self.network.get_artist("Test Artist")