From bcdd87092f91ad8f1bffa72156b9adeeacc3279e Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 14 Feb 2024 02:00:01 +0800 Subject: [PATCH] fix: resolve #247 --- src/components/VideoCard/VideoCard.vue | 3 +++ src/contentScripts/views/Home/components/ForYou.vue | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/VideoCard/VideoCard.vue b/src/components/VideoCard/VideoCard.vue index 941c0822..bdfdbb4f 100644 --- a/src/components/VideoCard/VideoCard.vue +++ b/src/components/VideoCard/VideoCard.vue @@ -22,6 +22,7 @@ interface Props { capsuleText?: string bvid?: string aid?: number + uri?: string /** If you want to show preview video, you should set the cid value */ cid?: number epid?: number @@ -42,6 +43,8 @@ const videoUrl = computed(() => { return `https://www.bilibili.com/video/${props.bvid ?? `av${props.aid}`}` else if (props.epid) return `https://www.bilibili.com/bangumi/play/ep${props.epid}` + else if (props.uri) + return props.uri else return '' }) diff --git a/src/contentScripts/views/Home/components/ForYou.vue b/src/contentScripts/views/Home/components/ForYou.vue index a4a087fd..fa220600 100644 --- a/src/contentScripts/views/Home/components/ForYou.vue +++ b/src/contentScripts/views/Home/components/ForYou.vue @@ -173,6 +173,7 @@ function jumpToLoginPage() { :published-timestamp="video.pubdate" :bvid="video.bvid" :cid="video.cid" + :uri="video.uri" show-preview /> @@ -191,7 +192,8 @@ function jumpToLoginPage() { :bvid="video.bvid" :view-str="video.cover_left_text_1" :danmaku-str="video.cover_left_text_2" - :cid="video?.player_args?.cid " + :cid="video?.player_args?.cid" + :uri="video.uri" show-preview />