fix: userPreferred best matches not being matched properly

This commit is contained in:
2024-08-26 22:12:00 -04:00
parent 342e2c2bd8
commit a9fa2baafe

View File

@@ -75,7 +75,10 @@ function getAniwatchId(
userPreferred: anime.jname, userPreferred: anime.jname,
})), })),
); );
return animes.find((anime) => anime.name === bestMatchingTitle)?.id; return animes.find(
(anime) =>
anime.name === bestMatchingTitle || anime.jname === bestMatchingTitle,
)?.id;
}); });
} }