Fix crash when no comics are found in the IssueIdentifier

This commit is contained in:
Timmy Welch 2024-03-12 18:19:22 -07:00
parent 51db3e1249
commit 37c809db2a

View File

@ -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.")