item.exists 时写 _uploaded.mark

This commit is contained in:
yzqzss 2023-06-02 20:30:44 +08:00
parent f53dcd8f3c
commit aa5537a1e5

View File

@ -36,6 +36,8 @@ def upload_bvid(bvid):
print(f'item {identifier} 已存在(item.exists)')
if item.metadata.get("upload-state") == "uploaded":
print(f'{identifier} 已经上传过了,跳过(item.metadata.uploaded)')
with open(f'{videos_basepath}/{identifier}/_uploaded.mark', 'w', encoding='utf-8') as f:
f.write('')
continue
filedict = {} # "remote filename": "local filename"
for filename in os.listdir(f'{videos_basepath}/{identifier}'):