mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(filters): load only from active indexers (#202)
This commit is contained in:
parent
dc0428fcc9
commit
8faf7ed410
1 changed files with 2 additions and 1 deletions
|
@ -104,7 +104,7 @@ func (r *FilterRepo) FindByID(ctx context.Context, filterID int) (*domain.Filter
|
|||
return &f, nil
|
||||
}
|
||||
|
||||
// FindByIndexerIdentifier find active filters only
|
||||
// FindByIndexerIdentifier find active filters with active indexer only
|
||||
func (r *FilterRepo) FindByIndexerIdentifier(indexer string) ([]domain.Filter, error) {
|
||||
//r.db.lock.RLock()
|
||||
//defer r.db.lock.RUnlock()
|
||||
|
@ -159,6 +159,7 @@ func (r *FilterRepo) FindByIndexerIdentifier(indexer string) ([]domain.Filter, e
|
|||
JOIN indexer i on i.id = fi.indexer_id
|
||||
WHERE i.identifier = ?
|
||||
AND f.enabled = true
|
||||
AND i.enabled = true
|
||||
ORDER BY f.priority DESC`, indexer)
|
||||
if err != nil {
|
||||
log.Error().Stack().Err(err).Msg("error querying filter row")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue