zhangyong 8 months ago
parent
commit
40907103c7
1 changed files with 5 additions and 2 deletions
  1. 5 2
      video_rewriting/video_processor.py

+ 5 - 2
video_rewriting/video_processor.py

@@ -237,7 +237,7 @@ class VideoProcessor:
                         continue
                     # 上传视频和封面,并更新数据库
                     code = cls.upload_video_and_thumbnail(new_video_path, cover, v_id, new_title, task_mark, name, piaoquan_id,
-                                                   video_path_url, mark, channel_id, url, old_title, title, rule)
+                                                   video_path_url, mark, channel_id, url, old_title, title, rule, video)
                     # 更新已使用的视频号状态
                     pq_url = f'https://admin.piaoquantv.com/cms/post-detail/{code}/detail'  # 站内视频链接
                     if name == "单点视频":
@@ -589,7 +589,7 @@ class VideoProcessor:
 
     @classmethod
     def upload_video_and_thumbnail(cls, new_video_path: str, cover: str, v_id, new_title: str, task_mark: str, name: str, piaoquan_id,
-                                   video_path_url: str, mark: str, channel_id: str, url: str, old_title: str, title, rule: str):
+                                   video_path_url: str, mark: str, channel_id: str, url: str, old_title: str, title, rule: str, video):
         """
         上传视频和封面到OSS,并更新数据库
         """
@@ -604,6 +604,9 @@ class VideoProcessor:
                 time.sleep(1)
                 if channel_id == "快手历史":
                     jpg = None
+                elif channel_id == '单点视频':
+                    if video['source'] == "快手":
+                        jpg = None
                 else:
                     if channel_id == "视频号历史":
                         jpg_path = Oss.download_sph_ls(cover, video_path_url, v_id)