Fixed list importers

This commit is contained in:
Eduard Urbach 2018-03-16 00:28:43 +01:00
parent 969adc530f
commit ef971ba6fb
3 changed files with 6 additions and 6 deletions

View File

@ -66,7 +66,7 @@ func Finish(ctx *aero.Context) string {
animeList.Save() animeList.Save()
return ctx.Redirect("/+" + user.Nick + "/animelist") return ctx.Redirect("/+" + user.Nick + "/animelist/watching")
} }
// getMatches finds and returns all matches for the logged in user. // getMatches finds and returns all matches for the logged in user.

View File

@ -50,8 +50,8 @@ func Finish(ctx *aero.Context) string {
rating := match.KitsuItem.Attributes.RatingTwenty rating := match.KitsuItem.Attributes.RatingTwenty
if rating < 2 { if rating < 0 {
rating = 2 rating = 0
} }
if rating > 20 { if rating > 20 {
@ -59,7 +59,7 @@ func Finish(ctx *aero.Context) string {
} }
// Convert rating // Convert rating
convertedRating := (float64(rating-2) / 18.0) * 10.0 convertedRating := (float64(rating) / 20.0) * 10.0
item := &arn.AnimeListItem{ item := &arn.AnimeListItem{
AnimeID: match.ARNAnime.ID, AnimeID: match.ARNAnime.ID,
@ -79,7 +79,7 @@ func Finish(ctx *aero.Context) string {
animeList.Save() animeList.Save()
return ctx.Redirect("/+" + user.Nick + "/animelist") return ctx.Redirect("/+" + user.Nick + "/animelist/watching")
} }
// getMatches finds and returns all matches for the logged in user. // getMatches finds and returns all matches for the logged in user.

View File

@ -75,7 +75,7 @@ func Finish(ctx *aero.Context) string {
animeList.Save() animeList.Save()
return ctx.Redirect("/+" + user.Nick + "/animelist") return ctx.Redirect("/+" + user.Nick + "/animelist/watching")
} }
// getMatches finds and returns all matches for the logged in user. // getMatches finds and returns all matches for the logged in user.