Update main.py
Browse files
main.py
CHANGED
|
@@ -64,12 +64,12 @@ def download_aria2(file_name, download_dir, url):
|
|
| 64 |
download_path = os.path.join(download_dir, file_name)
|
| 65 |
aria2_path = download_path + ".aria2"
|
| 66 |
|
| 67 |
-
#
|
| 68 |
-
if os.path.exists(download_path):
|
| 69 |
print(f'文件 {file_name} 已存在, URL: {url}')
|
| 70 |
return
|
| 71 |
|
| 72 |
-
#
|
| 73 |
if os.path.exists(aria2_path):
|
| 74 |
print(f'文件 {file_name} 正在下载, 继续断点下载, URL: {url}')
|
| 75 |
aria2_args = (
|
|
|
|
| 64 |
download_path = os.path.join(download_dir, file_name)
|
| 65 |
aria2_path = download_path + ".aria2"
|
| 66 |
|
| 67 |
+
# 检查文件是否已经下载完成
|
| 68 |
+
if os.path.exists(download_path) and not os.path.exists(aria2_path):
|
| 69 |
print(f'文件 {file_name} 已存在, URL: {url}')
|
| 70 |
return
|
| 71 |
|
| 72 |
+
# 如果存在 .aria2 文件, 继续断点下载
|
| 73 |
if os.path.exists(aria2_path):
|
| 74 |
print(f'文件 {file_name} 正在下载, 继续断点下载, URL: {url}')
|
| 75 |
aria2_args = (
|