From cac3480d165a94dc508d1113d1c959da54c6c14e Mon Sep 17 00:00:00 2001 From: Ovler Date: Wed, 11 Dec 2024 20:17:25 -0500 Subject: [PATCH] fix: mark videos as uploaded when uploader does not match --- biliarchiver/_biliarchiver_upload_bvid.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/biliarchiver/_biliarchiver_upload_bvid.py b/biliarchiver/_biliarchiver_upload_bvid.py index 309b20f..033bb29 100644 --- a/biliarchiver/_biliarchiver_upload_bvid.py +++ b/biliarchiver/_biliarchiver_upload_bvid.py @@ -109,7 +109,13 @@ def _upload_bvid( # check if the user is the same if item.metadata.get("uploader") != get_username(access_key=access_key, secret_key=secret_key): print(f"{remote_identifier} "+ _('不是你上传的,跳过') + " (item.metadata.uploader)") - return + with open( + f"{videos_basepath}/{local_identifier}/_uploaded.mark", + "w", + encoding="utf-8", + ) as f: + f.write("") + continue if item.metadata.get("upload-state") == "uploaded": print(f"{remote_identifier} " + _('已经上传过了,跳过') + " (item.metadata.uploaded)")