rogerxavier
commited on
Commit
•
caf85c2
1
Parent(s):
35b7ed6
Update api.py
Browse files
api.py
CHANGED
@@ -128,6 +128,7 @@ def process_tasks_and_upload(file_list, bili_meta_data, cover_image, cover_path,
|
|
128 |
cover_img_data = Image.open(io.BytesIO(cover_img)).convert("L").convert("RGB")
|
129 |
cover_path_to_image = os.path.join(cover_path, "cover.jpg")
|
130 |
cover_img_data.save(cover_path_to_image)
|
|
|
131 |
background_tasks.add_task(upload_video, bili_meta_data, cover_path_to_image)
|
132 |
|
133 |
|
@@ -163,6 +164,7 @@ async def upload_video(meta:dict,cover_path_to_image:str):
|
|
163 |
|
164 |
|
165 |
page = video_uploader.VideoUploaderPage(path='mp4_out/output_video.mp4', title=meta['title'], description=meta['desc'])
|
|
|
166 |
|
167 |
uploader = video_uploader.VideoUploader([page], meta, credential, cover=cover_path_to_image)
|
168 |
|
|
|
128 |
cover_img_data = Image.open(io.BytesIO(cover_img)).convert("L").convert("RGB")
|
129 |
cover_path_to_image = os.path.join(cover_path, "cover.jpg")
|
130 |
cover_img_data.save(cover_path_to_image)
|
131 |
+
print("cover_path_to_image是",cover_path_to_image)
|
132 |
background_tasks.add_task(upload_video, bili_meta_data, cover_path_to_image)
|
133 |
|
134 |
|
|
|
164 |
|
165 |
|
166 |
page = video_uploader.VideoUploaderPage(path='mp4_out/output_video.mp4', title=meta['title'], description=meta['desc'])
|
167 |
+
print("上传前的cover_path_to_image是",cover_path_to_image)
|
168 |
|
169 |
uploader = video_uploader.VideoUploader([page], meta, credential, cover=cover_path_to_image)
|
170 |
|