mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] fixes anime multi season handling
This commit is contained in:
@@ -160,9 +160,12 @@ async function decomposeEpisodes(torrent, files, metadata = { episodeCount: [] }
|
|||||||
// because of imdb season naming/absolute per series naming/multiple seasons
|
// because of imdb season naming/absolute per series naming/multiple seasons
|
||||||
// So in these cases we need to fetch cinemeta based metadata and decompose episodes using that
|
// So in these cases we need to fetch cinemeta based metadata and decompose episodes using that
|
||||||
await updateToCinemetaMetadata(metadata);
|
await updateToCinemetaMetadata(metadata);
|
||||||
files
|
if (files.some(file => Number.isInteger(file.season))) {
|
||||||
.filter(file => file.season === undefined && file.episodes)
|
// sometimes multi season anime torrents don't include season 1 naming
|
||||||
.forEach(file => file.season = 1);
|
files
|
||||||
|
.filter(file => file.season === undefined && file.episodes)
|
||||||
|
.forEach(file => file.season = 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// otherwise for anime type episodes are always absolute and for a single season
|
// otherwise for anime type episodes are always absolute and for a single season
|
||||||
files
|
files
|
||||||
|
|||||||
Reference in New Issue
Block a user