From 16b75e14dfc4135cbe10d42024b220d911689fac Mon Sep 17 00:00:00 2001 From: Mark Protas Date: Mon, 16 Jul 2018 12:22:55 -0400 Subject: [PATCH 1/2] Added page param for get top albums by tag --- pylast/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylast/__init__.py b/pylast/__init__.py index 0b9755b..42037af 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -1788,11 +1788,12 @@ class Artist(_BaseObject, _Taggable): return artists - def get_top_albums(self, limit=None, cacheable=True): + def get_top_albums(self, limit=None, page=1, cacheable=True): """Returns a list of the top albums.""" params = self._get_params() if limit: params["limit"] = limit + params["page"] = page return self._get_things("getTopAlbums", "album", Album, params, cacheable) From 70cfbc7bdac08d688c831a8b5e448cd98cd482cc Mon Sep 17 00:00:00 2001 From: Mark Protas Date: Mon, 16 Jul 2018 12:25:54 -0400 Subject: [PATCH 2/2] Reaaranged the signature of get_top_albums for backward compatibility --- pylast/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylast/__init__.py b/pylast/__init__.py index 42037af..18c3952 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -1788,7 +1788,7 @@ class Artist(_BaseObject, _Taggable): return artists - def get_top_albums(self, limit=None, page=1, cacheable=True): + def get_top_albums(self, limit=None, cacheable=True, page=1): """Returns a list of the top albums.""" params = self._get_params() if limit: