mirror of
https://github.com/saveweb/biliarchiver.git
synced 2024-09-19 11:05:28 -07:00
fix: 如果 len(list) == 1,IA 会把其转换为字符串
This commit is contained in:
parent
32c593416e
commit
a6f10725e4
@ -116,7 +116,7 @@ def _upload_bvid(bvid: str, *, update_existing: bool = False):
|
||||
|
||||
aid = bv_info['data']['View']['aid']
|
||||
owner_mid = bv_info['data']['View']['owner']['mid']
|
||||
owner_creator = bv_info['data']['View']['owner']['name'] # UP 主
|
||||
owner_creator: str = bv_info['data']['View']['owner']['name'] # UP 主
|
||||
|
||||
mids: List[int] = [owner_mid]
|
||||
creators: List[str] = [owner_creator]
|
||||
@ -137,7 +137,7 @@ def _upload_bvid(bvid: str, *, update_existing: bool = False):
|
||||
"collection": 'opensource_movies',
|
||||
"title": bv_info['data']['View']['title'] + f' P{pid} ' + p_part ,
|
||||
"description": remote_identifier + ' uploading...',
|
||||
'creator': creators,
|
||||
'creator': creators if len(creators) > 1 else owner_creator, # type: list[str] | str
|
||||
# UTC time
|
||||
'date': time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(pubdate)),
|
||||
'year': time.strftime("%Y", time.gmtime(pubdate)),
|
||||
|
Loading…
Reference in New Issue
Block a user