mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 15:36:49 +08:00
fix bug
This commit is contained in:
@@ -110,8 +110,7 @@ async function addSubscribe(season = 0) {
|
|||||||
let best_version = isExists.value ? 1 : 0
|
let best_version = isExists.value ? 1 : 0
|
||||||
if (props.media?.type === '电视剧')
|
if (props.media?.type === '电视剧')
|
||||||
// 全部存在时洗版
|
// 全部存在时洗版
|
||||||
best_version = seasonsNotExisted.value[season || 1] === 0 ? 1 : 0
|
best_version = (!seasonsNotExisted.value[season] || seasonsNotExisted.value[season] === 0) ? 1 : 0
|
||||||
|
|
||||||
// 请求API
|
// 请求API
|
||||||
const result: { [key: string]: any } = await api.post('subscribe', {
|
const result: { [key: string]: any } = await api.post('subscribe', {
|
||||||
name: props.media?.title,
|
name: props.media?.title,
|
||||||
@@ -135,7 +134,7 @@ async function addSubscribe(season = 0) {
|
|||||||
props.media?.title ?? '',
|
props.media?.title ?? '',
|
||||||
season,
|
season,
|
||||||
result.message,
|
result.message,
|
||||||
isExists.value,
|
best_version,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
@@ -149,12 +148,12 @@ function showSubscribeAddToast(result: boolean,
|
|||||||
title: string,
|
title: string,
|
||||||
season: number,
|
season: number,
|
||||||
message: string,
|
message: string,
|
||||||
isExists: boolean) {
|
best_version: number) {
|
||||||
if (season)
|
if (season)
|
||||||
title = `${title} ${formatSeason(season.toString())}`
|
title = `${title} ${formatSeason(season.toString())}`
|
||||||
|
|
||||||
let subname = '订阅'
|
let subname = '订阅'
|
||||||
if (isExists)
|
if (best_version > 0)
|
||||||
subname = '洗版订阅'
|
subname = '洗版订阅'
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
|
|||||||
Reference in New Issue
Block a user