diff --git a/comicapi/filenameparser.py b/comicapi/filenameparser.py index 660bd98..7a3e2c2 100644 --- a/comicapi/filenameparser.py +++ b/comicapi/filenameparser.py @@ -74,7 +74,7 @@ class FileNameParser: # replace any name separators with spaces tmpstr = self.fix_spaces(filename) - match = re.search(r"(?:\s\(?of\s)(\d+)(?: |\))", tmpstr, re.IGNORECASE) + match = re.search(r"\s\(?of\s(\d+)[ )]", tmpstr, re.IGNORECASE) if match: count = match.group(1) @@ -264,7 +264,7 @@ class FileNameParser: remainder = self.fix_spaces(remainder, remove_dashes=False) if volume != "": - remainder = re.sub(r"(?i)(.+)((?:v(?:|ol|olume))\.?\s?)" + volume, "", remainder, count=1) + remainder = re.sub(r"(?i)(.+)(v(?:|ol|olume)\.?\s?)" + volume, "", remainder, count=1) if year != "": remainder = remainder.replace(year, "", 1) if count != "": diff --git a/comictaggerlib/ui/talkeruigenerator.py b/comictaggerlib/ui/talkeruigenerator.py index 46f78f6..18630e5 100644 --- a/comictaggerlib/ui/talkeruigenerator.py +++ b/comictaggerlib/ui/talkeruigenerator.py @@ -316,7 +316,7 @@ def get_config_from_tab(tab: TalkerTab, definitions: settngs.Group) -> dict[str, and guessed_type not in (None, "Any") and (isinstance(guessed_type, type) and not isinstance(value, guessed_type)) ): - logger.warn( + logger.warning( "Guessed type is wrong on for '%s': expected: %s got: %s", setting_name, guessed_type,