mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
Feature: Improve filtering and release parsing (#56)
* feat: match against orig and cleaned rel * feat: add more release parse tests * feat: filter check tags * feat: improve filter tag parsing * refactor: simplify tag split and trim * fix(indexers): use releasetags for milkie * fix: properly replace spaces in string * feat: better source check * feat: extract releasetags
This commit is contained in:
parent
8f53becbb3
commit
ae1f14d0a4
6 changed files with 1036 additions and 130 deletions
|
@ -142,6 +142,7 @@ func (r *FilterRepo) FindFiltersForSite(site string) ([]domain.Filter, error) {
|
|||
return filters, nil
|
||||
}
|
||||
|
||||
// FindByIndexerIdentifier find active filters only
|
||||
func (r *FilterRepo) FindByIndexerIdentifier(indexer string) ([]domain.Filter, error) {
|
||||
|
||||
rows, err := r.db.Query(`
|
||||
|
@ -179,7 +180,8 @@ func (r *FilterRepo) FindByIndexerIdentifier(indexer string) ([]domain.Filter, e
|
|||
FROM filter f
|
||||
JOIN filter_indexer fi on f.id = fi.filter_id
|
||||
JOIN indexer i on i.id = fi.indexer_id
|
||||
WHERE i.identifier = ?`, indexer)
|
||||
WHERE i.identifier = ?
|
||||
AND f.enabled = true`, indexer)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue