mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-23 08:33:55 +08:00
Add episode_group param to TMDB episode requests
This commit is contained in:
@@ -272,6 +272,8 @@ export interface MediaInfo {
|
|||||||
vote_average?: number
|
vote_average?: number
|
||||||
// 描述
|
// 描述
|
||||||
overview?: string
|
overview?: string
|
||||||
|
// 自定义剧集组
|
||||||
|
episode_group?: string
|
||||||
// 二级分类
|
// 二级分类
|
||||||
category?: string
|
category?: string
|
||||||
// 详情页面
|
// 详情页面
|
||||||
|
|||||||
@@ -150,7 +150,8 @@ async function loadSeasonEpisodes(season: number) {
|
|||||||
// 加载季集信息
|
// 加载季集信息
|
||||||
if (seasonEpisodesInfo.value[season]) return
|
if (seasonEpisodesInfo.value[season]) return
|
||||||
try {
|
try {
|
||||||
const result: TmdbEpisode[] = await api.get(`tmdb/${mediaDetail.value.tmdb_id}/${season}`)
|
const params = mediaDetail.value.episode_group ? { episode_group: mediaDetail.value.episode_group } : undefined
|
||||||
|
const result: TmdbEpisode[] = await api.get(`tmdb/${mediaDetail.value.tmdb_id}/${season}`, params ? { params } : undefined)
|
||||||
seasonEpisodesInfo.value[season] = result || []
|
seasonEpisodesInfo.value[season] = result || []
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
|||||||
@@ -71,7 +71,8 @@ async function eventsHander(subscribe: Subscribe) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 调用API查询集信息
|
// 调用API查询集信息
|
||||||
const episodes: TmdbEpisode[] = await api.get(`tmdb/${subscribe.tmdbid}/${subscribe.season}`)
|
const params = subscribe.episode_group ? { episode_group: subscribe.episode_group } : undefined
|
||||||
|
const episodes: TmdbEpisode[] = await api.get(`tmdb/${subscribe.tmdbid}/${subscribe.season}`, params ? { params } : undefined)
|
||||||
|
|
||||||
interface EpisodeInfo {
|
interface EpisodeInfo {
|
||||||
title: string
|
title: string
|
||||||
|
|||||||
Reference in New Issue
Block a user