Added series title in the season selection modal

This commit is contained in:
ltctceplrm 2025-10-25 17:41:38 +02:00
parent 18af97a4c6
commit 3686a0175d
2 changed files with 7 additions and 3 deletions

View file

@ -248,13 +248,15 @@ export default class MediaDbPlugin extends Plugin {
new Notice('No seasons found for this series.');
return;
}
// Pass the original series title from the search result
const seriesName = selectResults[0]?.englishTitle || selectResults[0]?.title || '';
const modal = new MediaDbSeasonSelectModal(this, allSeasons.map(s => ({
season_number: s.seasonNumber,
name: s.seasonTitle || s.title,
episode_count: s.episodes || 0,
air_date: s.year,
poster_path: s.image,
})), true);
})), true, seriesName);
const selectedSeasons: any[] = await new Promise(resolve => {
modal.setSubmitCallback(resolve);
modal.open();