From eba70949eba25bdbef9a7fe288907ee8787b5b55 Mon Sep 17 00:00:00 2001 From: Markus Nyman Date: Tue, 17 Jan 2023 02:40:30 +0200 Subject: [PATCH] Fix case where nothing is found --- searcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searcher.py b/searcher.py index 5be10f1..58a5869 100644 --- a/searcher.py +++ b/searcher.py @@ -156,6 +156,8 @@ class Searcher(ABC): single_result = self._check_single_result() if single_result: return single_result + elif len(self.items_with_same_name) < 1: + return None # If the search contains multiple results, then we need to confirm with the user which show # the script should use, or access the local database to see if the user has already provided @@ -238,8 +240,6 @@ class Searcher(ABC): return complete_match_names[0] elif len(self.items_with_same_name) == 1: return self.items_with_same_name[0] - elif len(self.items_with_same_name) < 1: - return None class TVShowSearcher(Searcher):