mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-23 17:29:41 +08:00
fix(dialog): 修复剧集分组查询时 TMDBID 未设置或为空的问题
- 在 SubscribeEditDialog 和 SubscribeSeasonDialog 组件中添加了对 TMDBID 的空值检查 - 如果 TMDBID 未设置或为空,将不会执行剧集分组查询,避免出现错误
This commit is contained in:
@@ -99,6 +99,10 @@ function episodeGroupItemProps(item: { title: string; subtitle: string }) {
|
||||
|
||||
// 查询所有剧集组
|
||||
async function getEpisodeGroups() {
|
||||
if (!subscribeForm.value.tmdbid) {
|
||||
console.log('tmdbid is not set or is empty')
|
||||
return
|
||||
}
|
||||
try {
|
||||
episodeGroups.value = await api.get(`media/groups/${subscribeForm.value.tmdbid}`)
|
||||
} catch (error) {
|
||||
@@ -283,7 +287,7 @@ onMounted(() => {
|
||||
<DialogWrapper scrollable max-width="45rem" :fullscreen="!display.mdAndUp.value">
|
||||
<VCard>
|
||||
<VCardItem class="py-2">
|
||||
<VDialogCloseBtn @click="emit('close')" />
|
||||
<VDialogCloseBtn @click="emit('close')" />
|
||||
<template #prepend>
|
||||
<VIcon icon="mdi-clipboard-list-outline" class="me-2" />
|
||||
</template>
|
||||
|
||||
@@ -81,6 +81,10 @@ function getMediaId() {
|
||||
|
||||
// 查询所有剧集组
|
||||
async function getEpisodeGroups() {
|
||||
if (!props.media?.tmdb_id) {
|
||||
console.log('tmdbid is not set or is empty')
|
||||
return
|
||||
}
|
||||
try {
|
||||
episodeGroups.value = await api.get(`media/groups/${props.media?.tmdb_id}`)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user