|
|
@ -66,7 +66,7 @@ def cue_sheet_processor(path: str): |
|
|
|
return |
|
|
|
|
|
|
|
sheet = get_files_with_ext(path, [CUE_SHEET_EXTENSION]) |
|
|
|
args |
|
|
|
args = [] |
|
|
|
|
|
|
|
if (len(sheet) != 1): |
|
|
|
logging.error(f"Expected exactly one but {path} contains {len(sheet)} cue sheets - trying file processor") |
|
|
@ -119,7 +119,7 @@ def metadata_from_file(filename: str) -> str: |
|
|
|
title = filename.replace(number, "") |
|
|
|
number = re.sub(r'[ ]*-[ ]*', '', number) |
|
|
|
elif re.match(r'[0-9]+\.[ ]*[.]*', filename): |
|
|
|
logging.info(f"file {filename} matched metadata regex #2") |
|
|
|
logging.debug(f"file {filename} matched metadata regex #2") |
|
|
|
number = re.search(r'[0-9]+\.[ ]*', filename).group() |
|
|
|
title = filename.replace(number, "") |
|
|
|
number = re.sub(r'\.[ ]*', "", number) |
|
|
@ -178,10 +178,10 @@ def prepare_destination(path: str) -> Tuple[str,bool]: |
|
|
|
|
|
|
|
sub_path = path.replace(SRC_FOLDER, "") |
|
|
|
new_path = DST_FOLDER + sub_path |
|
|
|
existing: bool = os.path.exists(new_path) |
|
|
|
|
|
|
|
mkdir(new_path) |
|
|
|
|
|
|
|
existing: bool = len(os.listdir(new_path)) != 0 |
|
|
|
|
|
|
|
for img in images: |
|
|
|
img_name = img.replace(path, "") |
|
|
|
new_img_path = new_path + img_name |
|
|
|