From e26668bebeac72b528b11bb9957add631b573d3e Mon Sep 17 00:00:00 2001 From: ZXGU183 <53319390+ZXGU183@users.noreply.github.com> Date: Sat, 21 Jun 2025 16:32:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=9E=E6=BB=9A=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=BC=96=E8=A7=A3=E7=A0=81=E8=BF=94=E5=9B=9E=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BB=A5=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=8E=A5=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=20unicode=20=E7=9A=84=E9=97=AE=E9=A2=98=20(#1325)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/setting.json | 6 ------ biliup/engine/download.py | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 .vscode/setting.json diff --git a/.vscode/setting.json b/.vscode/setting.json deleted file mode 100644 index 1ca79c3..0000000 --- a/.vscode/setting.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit" - } -} \ No newline at end of file diff --git a/biliup/engine/download.py b/biliup/engine/download.py index a9fa493..2a81a35 100644 --- a/biliup/engine/download.py +++ b/biliup/engine/download.py @@ -372,7 +372,7 @@ class DownloadBase(ABC): end_time = time.localtime() self.download_cover( - time.strftime(self.gen_download_filename(), end_time if end_time else time.localtime() + time.strftime(self.gen_download_filename().encode("unicode-escape").decode(), end_time if end_time else time.localtime() ).encode().decode("unicode-escape")) # 更新数据库中封面存储路径 with SessionLocal() as db: @@ -495,9 +495,9 @@ class DownloadBase(ABC): if os.path.exists(f"{fmt_file_name}.{self.suffix}"): file_time += 1 else: - filename = fmt_file_name - break - return filename.encode("unicode-escape").decode() + return fmt_file_name + else: + return filename @staticmethod def download_file_rename(old_file_name, file_name):