From 37c809db2abc2fb5567ca37c0c21cf66dcb315b4 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Tue, 12 Mar 2024 18:19:22 -0700 Subject: [PATCH] Fix crash when no comics are found in the IssueIdentifier --- comictaggerlib/issueidentifier.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/comictaggerlib/issueidentifier.py b/comictaggerlib/issueidentifier.py index d5e9ef1..34a0735 100644 --- a/comictaggerlib/issueidentifier.py +++ b/comictaggerlib/issueidentifier.py @@ -643,7 +643,10 @@ class IssueIdentifier: ) final_cover_matching.remove(match) - best_score = final_cover_matching[0].distance + if final_cover_matching: + best_score = final_cover_matching[0].distance + else: + best_score = 0 if best_score >= self.min_score_thresh: if len(final_cover_matching) == 1: self.log_msg("No matching pages in the issue.")