new TUI is fully functional; needs some polishing

This commit is contained in:
Lincoln Stein
2023-06-02 17:20:50 -04:00
parent 41f7758977
commit 1390b65a9c
5 changed files with 186 additions and 71 deletions

View File

@ -322,8 +322,8 @@ def download_with_resume(url: str, dest: Path, access_token: str = None) -> Path
logger.warning("corrupt existing file found. re-downloading")
os.remove(dest)
exist_size = 0
if resp.status_code == 416 or exist_size == content_length:
if resp.status_code == 416 or (content_length > 0 and exist_size == content_length):
logger.warning(f"{dest}: complete file found. Skipping.")
return dest
elif resp.status_code == 206 or exist_size > 0: