Ran prettier

This commit is contained in:
ltctceplrm 2025-12-09 21:16:53 +01:00
parent bd2b84bbce
commit 35ea3cbb22
2 changed files with 28 additions and 21 deletions

View file

@ -69,7 +69,7 @@ export class TMDBSeasonAPI extends APIModel {
id: result.id.toString(),
seasonTitle: result.name ?? result.original_name ?? '',
seasonNumber: totalSeasons,
})
}),
);
}
@ -105,7 +105,7 @@ export class TMDBSeasonAPI extends APIModel {
id: `${tvId}/season/${seasonNumber}`,
seasonTitle: season.name ?? titleText,
seasonNumber: seasonNumber,
})
}),
);
}
}

View file

@ -250,13 +250,18 @@ export default class MediaDbPlugin extends Plugin {
}
// 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 => ({
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, seriesName);
})),
true,
seriesName,
);
const selectedSeasons: any[] = await new Promise(resolve => {
modal.setSubmitCallback(resolve);
modal.open();
@ -265,7 +270,8 @@ export default class MediaDbPlugin extends Plugin {
return;
}
// Fetch full metadata for each selected seasond and create the note
await Promise.all(selectedSeasons.map(async season => {
await Promise.all(
selectedSeasons.map(async season => {
const orig = allSeasons.find(s => s.seasonNumber === season.season_number);
if (orig) {
// Fetch full metadata using getById
@ -277,7 +283,8 @@ export default class MediaDbPlugin extends Plugin {
await this.createMediaDbNotes([orig]);
}
}
}));
}),
);
return;
}