verbose + fix remove
This commit is contained in:
parent
843bf00850
commit
efec5add4c
@ -30,6 +30,7 @@ def download(path, file):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
print(f"Download {path}/{file}")
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["rclone", "copy", "-P", "-v", f"{remote}:{path}/{file}", f"{path}/"],
|
["rclone", "copy", "-P", "-v", f"{remote}:{path}/{file}", f"{path}/"],
|
||||||
check=True,
|
check=True,
|
||||||
@ -78,11 +79,10 @@ def remove(path):
|
|||||||
|
|
||||||
for name in os.listdir(path):
|
for name in os.listdir(path):
|
||||||
if os.path.isfile(name):
|
if os.path.isfile(name):
|
||||||
print(name)
|
|
||||||
id = get_title_shortid(name)
|
id = get_title_shortid(name)
|
||||||
|
|
||||||
if not id:
|
if not id:
|
||||||
to_remove.append(name)
|
to_remove.append(f"{path}/{name}")
|
||||||
|
|
||||||
if len(to_remove) > 100:
|
if len(to_remove) > 100:
|
||||||
print("Too much to delete:")
|
print("Too much to delete:")
|
||||||
|
Loading…
Reference in New Issue
Block a user