Improved search

This commit is contained in:
2017-07-02 17:51:17 +02:00
parent 464a6ec26b
commit 326c4161aa
7 changed files with 43 additions and 14 deletions

View File

@ -36,7 +36,9 @@ func updateAnimeIndex() {
animeSearchIndex.TextToID[strings.ToLower(anime.Title.English)] = anime.ID
}
if anime.Title.Japanese != "" {
// Make sure we only include Japanese titles that actually contain unicode letters
// because otherwise they might overlap with the English titles.
if anime.Title.Japanese != "" && arn.ContainsUnicodeLetters(anime.Title.Japanese) {
animeSearchIndex.TextToID[strings.ToLower(anime.Title.Japanese)] = anime.ID
}