mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 16:53:24 +00:00
happy path in zoechip season/episode scraping
This commit is contained in:
@@ -73,13 +73,13 @@ export async function getZoeChipSeasonID(ctx: ScrapeContext, media: ShowMedia, s
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const season of seasons) {
|
const foundSeason = seasons.find((season) => season.season === media.season.number);
|
||||||
if (season.season === media.season.number) {
|
|
||||||
return season.id;
|
if (!foundSeason) {
|
||||||
}
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return foundSeason.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getZoeChipEpisodeID(
|
export async function getZoeChipEpisodeID(
|
||||||
@@ -116,11 +116,11 @@ export async function getZoeChipEpisodeID(
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const episode of episodes) {
|
const foundEpisode = episodes.find((episode) => episode.episode === media.episode.number);
|
||||||
if (episode.episode === media.episode.number) {
|
|
||||||
return episode.id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!foundEpisode) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return foundEpisode.id;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user