From 2e56e06cca824074b481f246e75ccf99b4d676c7 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Mon, 7 Feb 2022 07:03:20 +0100 Subject: [PATCH] Time to sleep --- criteriaSorter.py | 2 +- fileops.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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.+)$", ]