diff --git a/services/leaderboard.go b/services/leaderboard.go index abb94a9..14783cb 100644 --- a/services/leaderboard.go +++ b/services/leaderboard.go @@ -223,11 +223,13 @@ func (srv *LeaderboardService) GenerateByUser(user *models.User, interval *model return nil, err } + // exclude unknown language (will also exclude browsing time by chrome-wakatime plugin) + total := summary.TotalTime() - summary.TotalTimeByKey(models.SummaryLanguage, models.UnknownSummaryKey) return &models.LeaderboardItem{ User: user, UserID: user.ID, Interval: (*interval)[0], - Total: summary.TotalTime(), + Total: total, }, nil }