|
|
@ -688,7 +688,11 @@ class Server: |
|
|
|
|
|
|
|
|
def clear_download_cache(self): |
|
|
def clear_download_cache(self): |
|
|
cache_files = glob(f"{self.root}/download/user_custom/*/*.dat") |
|
|
cache_files = glob(f"{self.root}/download/user_custom/*/*.dat") |
|
|
self.o.info(f"Delete {len(cache_files)} cache files?") |
|
|
size = 0 |
|
|
|
|
|
for f in cache_files: |
|
|
|
|
|
size += os.path.getsize(f) |
|
|
|
|
|
|
|
|
|
|
|
self.o.info(f"Delete {len(cache_files)} ({format_bytes(size)}) cache files?") |
|
|
if not self.wait_input(): |
|
|
if not self.wait_input(): |
|
|
return True |
|
|
return True |
|
|
|
|
|
|
|
|
|