feat(filters): show current download count in list (#2001)

* feat(filters): show current and max downloads in list

* feat(filters): remove unused func param
This commit is contained in:
ze0s 2025-03-16 18:33:47 +01:00 committed by GitHub
parent c85fa3f31a
commit ef7317dde6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 63 additions and 9 deletions

View file

@ -94,6 +94,15 @@ func (s *service) Find(ctx context.Context, params domain.FilterQueryParams) ([]
}
filter.Indexers = indexers
if filter.MaxDownloads > 0 && filter.MaxDownloadsUnit != "" {
counts, err := s.repo.GetDownloadsByFilterId(ctx, filter.ID)
if err != nil {
return ret, err
}
filter.Downloads = counts
}
ret = append(ret, filter)
}