diff --git a/source/application/download.py b/source/application/download.py index e17663a..dacd755 100644 --- a/source/application/download.py +++ b/source/application/download.py @@ -171,26 +171,27 @@ class Download: ): async with self.SEMAPHORE: headers = self.headers.copy() - try: - length, suffix = await self.__head_file( - url, - headers, - format_, - ) - except HTTPError as error: - logging( - log, - self.message( - "网络异常,{0} 请求失败,错误信息: {1}").format(name, repr(error)), - ERROR, - ) - # logging( - # log, - # f"{url} Head Headers: {headers.get("Range")}", - # WARNING, - # ) - return False - temp = self.temp.joinpath(f"{name}.{suffix}") + # try: + # length, suffix = await self.__head_file( + # url, + # headers, + # format_, + # ) + # except HTTPError as error: + # logging( + # log, + # self.message( + # "网络异常,{0} 请求失败,错误信息: {1}").format(name, repr(error)), + # ERROR, + # ) + # # logging( + # # log, + # # f"{url} Head Headers: {headers.get("Range")}", + # # WARNING, + # # ) + # return False + # temp = self.temp.joinpath(f"{name}.{suffix}") + temp = self.temp.joinpath(f"{name}.{format_}") self.__update_headers_range(headers, temp, ) try: async with self.client.stream("GET", url, headers=headers, ) as response: @@ -210,7 +211,8 @@ class Download: temp, path, name, - suffix, + # suffix, + format_, log, ) self.manager.move(temp, real) diff --git a/static/Release_Notes.md b/static/Release_Notes.md index 13dbe7b..70f1fb3 100644 --- a/static/Release_Notes.md +++ b/static/Release_Notes.md @@ -1,12 +1,13 @@ **项目更新内容:** -1. 优化从浏览器读取 Cookie 功能 -2. 修复文件名称过长报错的问题 -3. 优化已下载文件判断逻辑 -4. 更新文件下载并发数量 -5. 新增文件名称长度限制 -6. 优化文件后缀处理逻辑 -7. 优化代理测试逻辑 +1. 修复下载文件频繁提示失败的问题 +2. 优化从浏览器读取 Cookie 功能 +3. 修复文件名称过长报错的问题 +4. 优化已下载文件判断逻辑 +5. 更新文件下载并发数量 +6. 新增文件名称长度限制 +7. 优化文件后缀处理逻辑 +8. 优化代理测试逻辑

旧版本升级后首次运行请删除配置文件 settings.json,删除后重新运行程序会自动生成新的默认配置文件!