[scraper] updates horriblesubs mapping

This commit is contained in:
TheBeastLT
2020-03-17 08:25:31 +01:00
parent 7e7e46a5f3
commit 8e67c5f40e
2 changed files with 12 additions and 1 deletions

View File

@@ -5393,5 +5393,16 @@
"Yatogame-chan Kansatsu Nikki S2": {
"showId": "1353",
"kitsu_id": "42398"
},
"K - Seven Stories": {
"showId": "1381",
"kitsu_id": [
"12116",
"41770",
"41772",
"41767",
"41768",
"41771"
]
}
}

View File

@@ -120,7 +120,7 @@ async function _parseShowData(showData) {
const kitsuIdsMapping = Array.isArray(kitsuId) && await Promise.all(kitsuId.map(kitsuId => getMetadata(kitsuId)))
.then((metas) => metas.reduce((map, meta) => {
const epOffset = Object.keys(map).length;
[...Array(meta.totalCount).keys()]
[...Array(meta.totalCount || 1).keys()]
.map(ep => ep + 1)
.forEach(ep => map[ep + epOffset] = { kitsuId: meta.kitsuId, episode: ep, title: meta.title });
return map;