mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 16:56:40 +08:00
Fix: pass null instead of 0 for season parameter when subscribing to movies
Co-authored-by: jxxghp <51039935+jxxghp@users.noreply.github.com>
This commit is contained in:
co-authored by
jxxghp
parent
8be96358ae
commit
626725a8ca
Generated
+17019
File diff suppressed because it is too large
Load Diff
@@ -138,7 +138,7 @@ async function handleAddSubscribe() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 调用API添加订阅,电视剧的话需要指定季
|
// 调用API添加订阅,电视剧的话需要指定季
|
||||||
async function addSubscribe(season: number = 0, best_version: number = 0) {
|
async function addSubscribe(season: number | null = 0, best_version: number = 0) {
|
||||||
// 开始处理
|
// 开始处理
|
||||||
startNProgress()
|
startNProgress()
|
||||||
try {
|
try {
|
||||||
@@ -153,7 +153,7 @@ async function addSubscribe(season: number = 0, best_version: number = 0) {
|
|||||||
doubanid: props.media?.douban_id,
|
doubanid: props.media?.douban_id,
|
||||||
bangumiid: props.media?.bangumi_id,
|
bangumiid: props.media?.bangumi_id,
|
||||||
mediaid: props.media?.media_id ? `${props.media?.mediaid_prefix}:${props.media?.media_id}` : '',
|
mediaid: props.media?.media_id ? `${props.media?.mediaid_prefix}:${props.media?.media_id}` : '',
|
||||||
season,
|
season: props.media?.type === '电影' ? null : season,
|
||||||
best_version,
|
best_version,
|
||||||
episode_group: episodeGroup.value,
|
episode_group: episodeGroup.value,
|
||||||
})
|
})
|
||||||
@@ -183,7 +183,7 @@ async function addSubscribe(season: number = 0, best_version: number = 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 弹出添加订阅提示
|
// 弹出添加订阅提示
|
||||||
function showSubscribeAddToast(result: boolean, title: string, season: number, message: string, best_version: number) {
|
function showSubscribeAddToast(result: boolean, title: string, season: number | null, message: string, best_version: number) {
|
||||||
if (season) title = `${title} ${formatSeason(season.toString())}`
|
if (season) title = `${title} ${formatSeason(season.toString())}`
|
||||||
|
|
||||||
let subname = t('subscribe.normalSub')
|
let subname = t('subscribe.normalSub')
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ async function checkSeasonsSubscribed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 调用API添加订阅,电视剧的话需要指定季
|
// 调用API添加订阅,电视剧的话需要指定季
|
||||||
async function addSubscribe(season = 0) {
|
async function addSubscribe(season: number | null = 0) {
|
||||||
// 开始处理
|
// 开始处理
|
||||||
startNProgress()
|
startNProgress()
|
||||||
try {
|
try {
|
||||||
@@ -274,7 +274,7 @@ async function addSubscribe(season = 0) {
|
|||||||
tmdbid: mediaDetail.value?.tmdb_id,
|
tmdbid: mediaDetail.value?.tmdb_id,
|
||||||
doubanid: mediaDetail.value?.douban_id,
|
doubanid: mediaDetail.value?.douban_id,
|
||||||
bangumiid: mediaDetail.value?.bangumi_id,
|
bangumiid: mediaDetail.value?.bangumi_id,
|
||||||
season,
|
season: mediaDetail.value?.type === '电影' ? null : season,
|
||||||
best_version,
|
best_version,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@ async function addSubscribe(season = 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 弹出添加订阅提示
|
// 弹出添加订阅提示
|
||||||
function showSubscribeAddToast(result: boolean, title: string, season: number, message: string, best_version: number) {
|
function showSubscribeAddToast(result: boolean, title: string, season: number | null, message: string, best_version: number) {
|
||||||
if (season) title = `${title} ${formatSeason(season.toString())}`
|
if (season) title = `${title} ${formatSeason(season.toString())}`
|
||||||
|
|
||||||
let subname = t('media.subscribe.normal')
|
let subname = t('media.subscribe.normal')
|
||||||
|
|||||||
Reference in New Issue
Block a user