verbose + fix remove
All checks were successful
dl / lint (push) Successful in 1m33s
dl / docker (push) Successful in 50s

This commit is contained in:
Michel Roux 2023-10-02 11:21:44 +02:00
parent 843bf00850
commit efec5add4c

View File

@ -30,6 +30,7 @@ def download(path, file):
return
try:
print(f"Download {path}/{file}")
subprocess.run(
["rclone", "copy", "-P", "-v", f"{remote}:{path}/{file}", f"{path}/"],
check=True,
@ -78,11 +79,10 @@ def remove(path):
for name in os.listdir(path):
if os.path.isfile(name):
print(name)
id = get_title_shortid(name)
if not id:
to_remove.append(name)
to_remove.append(f"{path}/{name}")
if len(to_remove) > 100:
print("Too much to delete:")