|
|
@ -238,43 +238,22 @@ const getMoreInfo = async (title) =>{
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
const promises = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let data = JSON.parse(JSON.stringify(require('../assets/directory.json')));
|
|
|
|
let data = JSON.parse(JSON.stringify(require('../assets/directory.json')));
|
|
|
|
const res = data.filter(x => x.title === title || x.mal_title === title)[0];
|
|
|
|
let result = data.filter(anime => anime.title === title)[0];
|
|
|
|
|
|
|
|
|
|
|
|
if (!res.jkanime) {
|
|
|
|
return {
|
|
|
|
promises.push({
|
|
|
|
title: result.title || null,
|
|
|
|
title: res.title || null,
|
|
|
|
poster: result.poster || null,
|
|
|
|
poster: res.poster || null,
|
|
|
|
synopsis: result.description || null,
|
|
|
|
synopsis: res.description || null,
|
|
|
|
status: result.state || null,
|
|
|
|
status: res.state || null,
|
|
|
|
type: result.type || null,
|
|
|
|
type: res.type || null,
|
|
|
|
rating: result.score || null,
|
|
|
|
rating: res.score || null,
|
|
|
|
genres: result.genres || null,
|
|
|
|
genres: res.genres || null,
|
|
|
|
moreInfo: await animeExtraInfo(result.mal_title).then(info => info || null),
|
|
|
|
episodes: await animeflvInfo(res.id).then(episodes => episodes || null),
|
|
|
|
promo: await getAnimeVideoPromo(result.mal_title).then(promo => promo || null),
|
|
|
|
moreInfo: await animeExtraInfo(res.mal_title).then(info => info || null),
|
|
|
|
characters: await getAnimeCharacters(result.mal_title).then(characters => characters || null)
|
|
|
|
promo: await getAnimeVideoPromo(res.mal_title).then(promo => promo || null),
|
|
|
|
|
|
|
|
characters: await getAnimeCharacters(res.mal_title).then(characters => characters || null)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
promises.push({
|
|
|
|
|
|
|
|
title: res.title || null,
|
|
|
|
|
|
|
|
poster: res.poster || null,
|
|
|
|
|
|
|
|
synopsis: res.description || null,
|
|
|
|
|
|
|
|
status: res.state || null,
|
|
|
|
|
|
|
|
type: res.type || null,
|
|
|
|
|
|
|
|
rating: res.score || null,
|
|
|
|
|
|
|
|
genres: res.genres || null,
|
|
|
|
|
|
|
|
episodes: await jkanimeInfo(res.id).then(episodes => episodes || null),
|
|
|
|
|
|
|
|
moreInfo: await animeExtraInfo(res.mal_title).then(info => info || null),
|
|
|
|
|
|
|
|
promo: await getAnimeVideoPromo(res.mal_title).then(promo => promo || null),
|
|
|
|
|
|
|
|
characters: await getAnimeCharacters(res.mal_title).then(characters => characters || null)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return promises;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
console.log(e)
|
|
|
|
console.log(e)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -285,23 +264,15 @@ const getEpisodes = async (title) =>{
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
const promises = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let data = JSON.parse(JSON.stringify(require('../assets/directory.json')));
|
|
|
|
let data = JSON.parse(JSON.stringify(require('../assets/directory.json')));
|
|
|
|
const res = data.filter(x => x.title === title || x.mal_title === title)[0];
|
|
|
|
const res = data.filter(x => x.title === title || x.mal_title === title)[0];
|
|
|
|
|
|
|
|
|
|
|
|
if (!res.jkanime) {
|
|
|
|
if (!res.jkanime) {
|
|
|
|
promises.push({
|
|
|
|
return await animeflvInfo(res.id).then(episodes => episodes || null)
|
|
|
|
episodes: await animeflvInfo(res.id).then(episodes => episodes || null),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
promises.push({
|
|
|
|
return await jkanimeInfo(res.id).then(episodes => episodes || null)
|
|
|
|
episodes: await jkanimeInfo(res.id).then(episodes => episodes || null),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return promises;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
console.log(e)
|
|
|
|
console.log(e)
|
|
|
|
}
|
|
|
|
}
|
|
|
|