Skip to content

Commit

Permalink
fix: mark videos as uploaded when uploader does not match
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovler-Young committed Dec 12, 2024
1 parent e7abd84 commit cac3480
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion biliarchiver/_biliarchiver_upload_bvid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down

0 comments on commit cac3480

Please sign in to comment.