Skip to content

Commit

Permalink
Remove one last interruption in matching process (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpepple authored Aug 21, 2024
1 parent d1efc49 commit 2edd527
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions metrontagger/talker.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,11 @@ def _print_metadata_message(src: InfoSource, comic: Comic) -> None:
if result_count > 1:
LOGGER.debug("Check Hamming for '%s'", ca)
hamming_lst = self._get_hamming_results(ca, i_list)
if hamming_lst:
if len(hamming_lst) == 1:
self.match_results.add_good_match(fn)
return hamming_lst[0].id, False
issue_id = self._select_choice_from_matches(fn, hamming_lst)
if issue_id:
self.match_results.add_good_match(fn)
return issue_id, False
# Matched single cover within hamming distance from multiple results
if hamming_lst and len(hamming_lst) == 1:
self.match_results.add_good_match(fn)
return hamming_lst[0].id, False
# No hamming match, let's ask the user later.
self.match_results.add_multiple_match(MultipleMatch(fn, i_list))
return None, True

Expand Down

0 comments on commit 2edd527

Please sign in to comment.