mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(filters): set default Announce Type
to NEW
(#1890)
feat(filters): set default announce type NEW
This commit is contained in:
parent
2c0672f4bc
commit
ea20fb4f50
3 changed files with 15 additions and 3 deletions
|
@ -185,6 +185,10 @@ func (s *service) Store(ctx context.Context, filter *domain.Filter) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if filter.AnnounceTypes == nil || len(filter.AnnounceTypes) == 0 {
|
||||
filter.AnnounceTypes = []string{string(domain.AnnounceTypeNew)}
|
||||
}
|
||||
|
||||
if err := s.repo.Store(ctx, filter); err != nil {
|
||||
s.log.Error().Err(err).Msgf("could not store filter: %v", filter)
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue