diff --git a/src/api/types.ts b/src/api/types.ts index 1d98e81d..87d155b1 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -182,7 +182,7 @@ export interface MediaInfo { poster_path?: string // 评分 - vote_average: number + vote_average?: number // 描述 overview?: string diff --git a/src/components/cards/MediaCard.vue b/src/components/cards/MediaCard.vue index 16c3150a..5e8f7088 100644 --- a/src/components/cards/MediaCard.vue +++ b/src/components/cards/MediaCard.vue @@ -271,21 +271,10 @@ async function checkSeasonsNotExists() { doneNProgress() } -// 检查电影是否存在 -async function checkMovieExists() { - try { - const result: NotExistMediaInfo[] = await api.post('download/notexists', props.media) - return !result || result.length === 0 - } - catch (error) { - console.error(error) - } -} - // 查询TMDB的所有季信息 async function getMediaSeasons() { try { - seasonInfos.value = await api.get(`tmdb/${props.media?.tmdb_id}/seasons`) + seasonInfos.value = await api.get(`tmdb/seasons/${props.media?.tmdb_id}`) } catch (error) { console.error(error) @@ -343,7 +332,17 @@ function getExistText(season: number) { // 打开详情页 function openDetailWindow() { - window.open(getDetailLink(), '_blank') + router.push({ + path: '/media', + query: { + mediaid: `${ + props.media?.tmdb_id + ? `tmdb:${props.media?.tmdb_id}` + : `douban:${props.media?.douban_id}` + }`, + type: props.media?.type, + }, + }) } // 开始搜索 diff --git a/src/components/cards/SubscribeCard.vue b/src/components/cards/SubscribeCard.vue index c9173f38..1a51949d 100644 --- a/src/components/cards/SubscribeCard.vue +++ b/src/components/cards/SubscribeCard.vue @@ -222,7 +222,7 @@ const dropdownItems = ref([