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:
Ludvig Lundgren 2022-01-01 21:50:38 +01:00 committed by GitHub
parent 8f53becbb3
commit ae1f14d0a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1036 additions and 130 deletions

View file

@ -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)
}