Exclude planned anime from statistics

This commit is contained in:
Eduard Urbach 2017-12-03 16:06:20 +01:00
parent e13820110c
commit fc964903b7

View File

@ -39,13 +39,18 @@ func GetStatsByUser(ctx *aero.Context) string {
defer animeList.Unlock()
for _, item := range animeList.Items {
status[item.Status]++
if item.Status == arn.AnimeListStatusPlanned {
continue
}
currentWatch := item.Episodes * item.Anime().EpisodeLength
reWatch := item.RewatchCount * item.Anime().EpisodeCount * item.Anime().EpisodeLength
duration := time.Duration(currentWatch + reWatch)
userStats.AnimeWatchingTime += duration * time.Minute
ratings[strconv.Itoa(int(item.Rating.Overall+0.5))]++
status[item.Status]++
types[item.Anime().Type]++
for _, studio := range item.Anime().Studios() {