fix(releases): releasetags freeleech parsing (#306)

* refactor(releases): remove err from constructor

* fix(releases): freeleech parsing and filtering

* chore: remove unused releaseinfo package
This commit is contained in:
Ludvig Lundgren 2022-06-14 22:26:45 +02:00 committed by GitHub
parent fd3f10f95a
commit 6675a1df3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 79 additions and 618 deletions

View file

@ -100,14 +100,10 @@ func (a *announceProcessor) processQueue(queue chan string) {
continue
}
rls, err := domain.NewRelease(a.indexer.Identifier)
if err != nil {
a.log.Error().Err(err).Msg("could not create new release")
continue
}
rls := domain.NewRelease(a.indexer.Identifier)
// on lines matched
err = a.onLinesMatched(a.indexer, tmpVars, rls)
err := a.onLinesMatched(a.indexer, tmpVars, rls)
if err != nil {
a.log.Debug().Msgf("error match line: %v", "")
continue
@ -178,11 +174,7 @@ func (a *announceProcessor) onLinesMatched(def *domain.IndexerDefinition, vars m
}
// parse fields
err = rls.ParseString(rls.TorrentName)
if err != nil {
a.log.Error().Stack().Err(err).Msg("announce: could not parse release")
return err
}
rls.ParseString(rls.TorrentName)
// parse torrentUrl
err = def.Parse.ParseTorrentUrl(vars, def.SettingsMap, rls)