From 4e645ca134d1aec6fb965fb5bc8e9189a401f6eb Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Tue, 27 Apr 2021 15:29:26 -0500 Subject: [PATCH] Set get_top_tracks limit even if it's `None` To get an unlimited number of top tracks, `_get_things` expects `params['limit']` to be set to `None`. However, this can't happen here because `None` is falsy. Fixes #366. --- src/pylast/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py index 1341de0..40f7468 100644 --- a/src/pylast/__init__.py +++ b/src/pylast/__init__.py @@ -2531,8 +2531,7 @@ class User(_Chartable): params = self._get_params() params["period"] = period - if limit: - params["limit"] = limit + params["limit"] = limit return self._get_things("getTopTracks", Track, params, cacheable, stream=stream)