@@ -305,11 +305,11 @@ def start(settings: Settings, force: bool = False) -> None:
305
305
LOGGER .info ("Starting Perdoo" )
306
306
307
307
with CONSOLE .status (f"Searching for non-{ settings .output .format } files" ):
308
- convert_collection (path = settings .collection_folder , output = settings .output .format )
308
+ convert_collection (path = settings .input_folder , output = settings .output .format )
309
309
310
310
with CONSOLE .status (f"Searching for { settings .output .format } files" ):
311
311
archives = load_archives (
312
- path = settings .collection_folder , output = settings .output .format , force = force
312
+ path = settings .input_folder , output = settings .output .format , force = force
313
313
)
314
314
315
315
for file , archive , details in archives :
@@ -322,7 +322,7 @@ def start(settings: Settings, force: bool = False) -> None:
322
322
323
323
metadata , metron_info , comic_info = fetch_from_services (settings = settings , details = details )
324
324
new_file = generate_filename (
325
- root = settings .collection_folder ,
325
+ root = settings .output_folder ,
326
326
extension = settings .output .format .value ,
327
327
metadata = metadata ,
328
328
)
@@ -359,18 +359,18 @@ def start(settings: Settings, force: bool = False) -> None:
359
359
continue
360
360
archive .path .unlink (missing_ok = True )
361
361
shutil .move (archive_file , archive .path )
362
- if file .relative_to (settings .collection_folder ) != new_file .relative_to (
363
- settings .collection_folder
362
+ if file .relative_to (settings .input_folder ) != new_file .relative_to (
363
+ settings .output_folder
364
364
):
365
365
LOGGER .info (
366
366
"Organizing comic, moving file to %s" ,
367
- new_file .relative_to (settings .collection_folder ),
367
+ new_file .relative_to (settings .output_folder ),
368
368
)
369
369
new_file .parent .mkdir (parents = True , exist_ok = True )
370
370
shutil .move (file , new_file )
371
371
372
372
for folder in sorted (
373
- settings .collection_folder .rglob ("*" ), key = lambda p : len (p .parts ), reverse = True
373
+ settings .input_folder .rglob ("*" ), key = lambda p : len (p .parts ), reverse = True
374
374
):
375
375
if folder .is_dir () and not any (folder .iterdir ()):
376
376
folder .rmdir ()
0 commit comments