From fc9dfe15aa04044d6d099a412cc650f7ba875e67 Mon Sep 17 00:00:00 2001 From: Nathan Thomas Date: Sat, 18 Sep 2021 18:32:01 -0700 Subject: [PATCH] Fix lastfm crash when no results found #184 --- rip/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rip/core.py b/rip/core.py index 9c229b6..134d7c2 100644 --- a/rip/core.py +++ b/rip/core.py @@ -674,8 +674,10 @@ class RipCore(list): or results.get("collection") or results.get("albums", {}).get("data", False) ) - if items is None: + + if not items: raise NoResultsFound(query) + logger.debug("Number of results: %d", len(items)) for i, item in enumerate(items):