adds kitsu mapping for horrible subs
This commit is contained in:
@@ -88,8 +88,9 @@ async function getImdbId(info) {
|
||||
}
|
||||
|
||||
async function getKitsuId(title) {
|
||||
return cacheWrapImdbId(title,
|
||||
() => needle('get', `${KITSU_URL}/catalog/series/kitsu-anime-list/search=${title}.json`, { open_timeout: 60000 })
|
||||
const query = title.replace(/[;]+/g, ' ').replace(/[,%']+/g, '');
|
||||
return cacheWrapImdbId(query,
|
||||
() => needle('get', `${KITSU_URL}/catalog/series/kitsu-anime-list/search=${query}.json`, { open_timeout: 60000 })
|
||||
.then((response) => {
|
||||
const body = response.body;
|
||||
if (body && body.metas && body.metas.length) {
|
||||
|
||||
Reference in New Issue
Block a user