From 0a155a2e95efafdc8941d05782f578bc9a4f7eba Mon Sep 17 00:00:00 2001 From: yzqzss Date: Fri, 2 Jun 2023 22:01:23 +0800 Subject: [PATCH] desc lazy add --- _biliup_upload_bvid.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_biliup_upload_bvid.py b/_biliup_upload_bvid.py index 3642d36..6562b3c 100644 --- a/_biliup_upload_bvid.py +++ b/_biliup_upload_bvid.py @@ -83,7 +83,7 @@ def upload_bvid(bvid): "mediatype": "movies", "collection": 'opensource_movies', "title": bv_info['data']['View']['title'] + f' P{pid} ' + part , - "description": bv_info['data']['View']['desc'], + "description": identifier + 'uploading...', 'creator': bv_info['data']['View']['owner']['name'], # UP δΈ» # UTC time 'date': time.strftime("%Y-%m-%d", time.gmtime(pubdate)), @@ -123,6 +123,8 @@ def upload_bvid(bvid): new_md = {} if item.metadata.get("upload-state") != "uploaded": new_md.update({"upload-state": "uploaded"}) + if item.metadata.get("description") != bv_info['data']['View']['desc']: + new_md.update({"description": bv_info['data']['View']['desc']}) if new_md: r = item.modify_metadata( metadata=new_md,