mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-08-05 21:53:27 +08:00
fix bug
This commit is contained in:
@@ -49,6 +49,7 @@ async function getMediaDetail() {
|
||||
isRefreshed.value = true
|
||||
if (!mediaDetail.value.tmdb_id)
|
||||
return
|
||||
|
||||
// 检查存在状态
|
||||
if (mediaDetail.value.type === '电影')
|
||||
checkMovieExists()
|
||||
@@ -132,7 +133,8 @@ async function checkSeasonsNotExists() {
|
||||
state = 2
|
||||
else if (item.episodes.length < item.total_episodes)
|
||||
state = 1
|
||||
|
||||
if (state !== 2)
|
||||
isExists.value = true
|
||||
seasonsNotExisted.value[item.season] = state
|
||||
})
|
||||
}
|
||||
@@ -175,9 +177,9 @@ async function addSubscribe(season = 0) {
|
||||
try {
|
||||
// 是否洗版
|
||||
let best_version = isExists.value ? 1 : 0
|
||||
if (mediaDetail.value?.type === '电视剧' && mediaDetail.value?.tmdb_id)
|
||||
if (season)
|
||||
// 全部存在时洗版
|
||||
best_version = (!seasonsNotExisted.value[season] || seasonsNotExisted.value[season] === 0) ? 1 : 0
|
||||
best_version = !seasonsNotExisted.value[season] ? 1 : 0
|
||||
// 请求API
|
||||
const result: { [key: string]: any } = await api.post('subscribe', {
|
||||
name: mediaDetail.value?.title,
|
||||
|
||||
Reference in New Issue
Block a user