diff --git a/audiobook_metadata/metadata_audiobooks_library.py b/audiobook_metadata/metadata_audiobooks_library.py index 90f343c..14042f6 100755 --- a/audiobook_metadata/metadata_audiobooks_library.py +++ b/audiobook_metadata/metadata_audiobooks_library.py @@ -599,6 +599,10 @@ class Audiobook: if not m: logger.trace(f"No artist found in comment for {self.bookPath}") return + if len(m.group(1).strip()) < 5: + logger.debug(f"Match group {m.group(1)} found but discarded") + return + logger.trace(f"Match groups: {m.group()}, Book: {self.name}") self.changed = True artist = re.sub(r"\s*\([^)]*\)", "", m.group(1).strip()).strip() logger.trace(f"Remove {artist} from comment: {self.comment}")