From 6c09b4181be2b70562b2098a09538626fded0392 Mon Sep 17 00:00:00 2001 From: Evil0ctal Date: Mon, 23 Dec 2024 14:22:27 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7:=20Fix=20ParseVideo.py=20->=20#526?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/web/views/ParseVideo.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/web/views/ParseVideo.py b/app/web/views/ParseVideo.py index 8c90e547d..0ab59629a 100644 --- a/app/web/views/ParseVideo.py +++ b/app/web/views/ParseVideo.py @@ -145,12 +145,15 @@ def parse_video(): # 如果是视频/If it's video if url_type == ViewsUtils.t('视频', 'Video'): # 添加视频信息 - table_list.insert(4, [ViewsUtils.t('视频链接-水印', 'Video URL-Watermark'), - put_link(ViewsUtils.t('点击查看', 'Click to view'), - data.get('video_data').get('wm_video_url_HQ'), new_window=True)]) - table_list.insert(5, [ViewsUtils.t('视频链接-无水印', 'Video URL-No Watermark'), - put_link(ViewsUtils.t('点击查看', 'Click to view'), - data.get('video_data').get('nwm_video_url_HQ'), new_window=True)]) + wm_video_url_HQ = data.get('video_data').get('wm_video_url_HQ') + nwm_video_url_HQ = data.get('video_data').get('nwm_video_url_HQ') + if wm_video_url_HQ and nwm_video_url_HQ: + table_list.insert(4, [ViewsUtils.t('视频链接-水印', 'Video URL-Watermark'), + put_link(ViewsUtils.t('点击查看', 'Click to view'), + wm_video_url_HQ, new_window=True)]) + table_list.insert(5, [ViewsUtils.t('视频链接-无水印', 'Video URL-No Watermark'), + put_link(ViewsUtils.t('点击查看', 'Click to view'), + nwm_video_url_HQ, new_window=True)]) table_list.insert(6, [ViewsUtils.t('视频下载-水印', 'Video Download-Watermark'), put_link(ViewsUtils.t('点击下载', 'Click to download'), f"/api/download?url={url}&prefix=true&with_watermark=true",