|
@@ -170,7 +170,7 @@ class ConsumptionRecommend(object):
|
|
|
"【 搬运&改造效率工具失败通知 】")
|
|
|
return
|
|
|
logger.info(f"[处理] {url}视频下载成功")
|
|
|
- if data["title_category"] == "AI标题" or data["trailer_share"] == "AI标题":
|
|
|
+ if data["title_category"] == "AI标题" or str(data["trailer_share"]) == "AI标题":
|
|
|
title = GPT4oMini.get_ai_mini_title(
|
|
|
original_title if data["title_category"] == "AI标题" else data["title_category"])
|
|
|
else:
|
|
@@ -226,8 +226,8 @@ class ConsumptionRecommend(object):
|
|
|
video_path = FFmpeg.video_crop(video_path, file_path)
|
|
|
if data["video_clipping_time"]: # 判断是否需要指定视频时长
|
|
|
video_path = FFmpeg.video_ggduration(video_path, file_path, data["video_clipping_time"])
|
|
|
- if data['trailer_share']:
|
|
|
- prompt = Material.get_propmt_data(data['trailer_share'])
|
|
|
+ if str(data['trailer_share']):
|
|
|
+ prompt = Material.get_propmt_data(str(data['trailer_share']))
|
|
|
pw_srt_text = GPT4oMini.get_ai_mini_pw(title, prompt)
|
|
|
voice = data['trailer_share_audio']
|
|
|
if voice:
|
|
@@ -288,7 +288,7 @@ class ConsumptionRecommend(object):
|
|
|
"【 搬运&改造效率工具失败通知 】")
|
|
|
return
|
|
|
logger.info(f"[处理] 数据片尾音频下载成功")
|
|
|
- if "AI片尾引导" in data['trailer_share']:
|
|
|
+ if "AI片尾引导" in str(data['trailer_share']):
|
|
|
jpg_path = FFmpeg.video_png(video_path, file_path) # 生成视频最后一帧jpg
|
|
|
if not os.path.exists(jpg_path) or os.path.getsize(jpg_path) == 0:
|
|
|
data["transform_rule"] = "仅改造"
|