mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
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:
parent
c85fa3f31a
commit
ef7317dde6
5 changed files with 63 additions and 9 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue