Skip to content

Commit

Permalink
fix:data matching
Browse files Browse the repository at this point in the history
  • Loading branch information
empty-233 committed Dec 2, 2023
1 parent bffc53e commit 4b4cc36
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ let animeData: Root = {
bangumi_data_paths.map((path) => {
const bangumi_data: Array<bangumiDataList> = readFile(path);
bangumi_data.map((bangumiData) => {
const aod = findIfExists(anime_offline_database.data, bangumiData.title);
if (aod.length !== 0) {
aod[0].relations.map((url) => {
const aods = findIfExists(anime_offline_database.data, bangumiData.title);
if (aods.length !== 0) {
const aod = aods[aods.length - 1];
aod.relations.map((url) => {
const result = splitUrl(url);
bangumiData.sites.push({
site: result.domain,
Expand All @@ -85,12 +86,12 @@ bangumi_data_paths.map((path) => {
});
const data = {
...bangumiData,
animeSeason: aod[0].animeSeason,
status: aod[0].status,
episodes: aod[0].episodes,
picture: aod[0].picture,
thumbnail: aod[0].thumbnail,
synonyms: aod[0].synonyms,
animeSeason: aod.animeSeason,
status: aod.status,
episodes: aod.episodes,
picture: aod.picture,
thumbnail: aod.thumbnail,
synonyms: aod.synonyms,
};
//拆分月份,和bangumi一致
const pathSplit = path.split("/");
Expand Down

0 comments on commit 4b4cc36

Please sign in to comment.