Improved anime search

This commit is contained in:
2019-08-27 16:04:09 +09:00
parent f25501ca7d
commit 49f67d3a49
3 changed files with 7 additions and 2 deletions

View File

@ -24,6 +24,10 @@ func Anime(originalTerm string, maxLength int) []*arn.Anime {
add := func(anime *arn.Anime, similarity float64) {
similarity += float64(anime.Popularity.Total()) * popularityDamping
if anime.Type != "tv" && anime.Type != "movie" {
similarity -= 0.3
}
results = append(results, &Result{
obj: anime,
similarity: similarity,