mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-30 16:17:41 +01:00
fix idiotism
This commit is contained in:
parent
5661a7873a
commit
3f241c2d07
1 changed files with 7 additions and 2 deletions
|
@ -99,13 +99,18 @@ export async function getMetaFromId(
|
||||||
|
|
||||||
const episodes = await Tmdb.getEpisodes(
|
const episodes = await Tmdb.getEpisodes(
|
||||||
details.id.toString(),
|
details.id.toString(),
|
||||||
season?.season_number ?? 1
|
season.season_number === null || season.season_number === 0
|
||||||
|
? 1
|
||||||
|
: season.season_number
|
||||||
);
|
);
|
||||||
|
|
||||||
if (season && episodes) {
|
if (season && episodes) {
|
||||||
seasonData = {
|
seasonData = {
|
||||||
id: season.id.toString(),
|
id: season.id.toString(),
|
||||||
season_number: season.season_number,
|
season_number:
|
||||||
|
season.season_number === null || season.season_number === 0
|
||||||
|
? 1
|
||||||
|
: season.season_number,
|
||||||
title: season.name,
|
title: season.name,
|
||||||
episodes,
|
episodes,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue