test removing
All checks were successful
dl / lint (push) Successful in 2m15s
dl / docker (push) Successful in 1m2s

This commit is contained in:
Michel Roux 2023-10-05 15:21:14 +02:00
parent e91b76a01c
commit 8f022dbe48

View File

@ -48,6 +48,13 @@ def remove(path, file):
os.remove(os.path.join(path, file))
def clean(path, database):
for file in os.listdir(path):
if os.path.isfile(os.path.join(path, file)) and file not in database:
# remove(path, file)
print(f"Hop {path}/{file}")
req_titles = requests.get(
"https://raw.githubusercontent.com/blawar/titledb/master/FR.fr.json"
)
@ -79,6 +86,11 @@ def get_title_shortid(name):
return id[0:-4] if id in titles else None
clean("nsz/base", bases)
clean("nsz/dlc", dlcs)
clean("nsz/updates", updates)
try:
subprocess.run(
["rclone", "sync", "-P", "-v", f"{remote}:nsz/homebrew", "nsz/homebrew/"],