diff --git a/criteriaSorter.py b/criteriaSorter.py index 1c4bc14..271ed46 100644 --- a/criteriaSorter.py +++ b/criteriaSorter.py @@ -99,7 +99,7 @@ def action_sort(argsp): logging.debug(e, exc_info=True) # Write a cancel file - if argsp.dry_run and len(list_of_operations) > 0: + if not argsp.dry_run and len(list_of_operations) > 0 or argsp.verbose > 3: logging.info("Writing cancel file...") with open(os.path.join(argsp.output, argsp.cancel_file), "w", encoding="utf-8") as f: for origin, destination in list_of_operations: diff --git a/fileops.py b/fileops.py index 4b45192..e3a1e5e 100644 --- a/fileops.py +++ b/fileops.py @@ -146,7 +146,7 @@ class ArtistHandler(FileHandler): def guess_artist_and_file_name(self): """Try to guess artist from file name""" regex = [ - r"(?P.+) by (?P.+)$", + r"(?P.+) by (?P[^\.]+)\..*$", r"(?P[^-]+)-(?P.+)$", # r"(?P.+)_(?P.+)$", ]