mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(indexers): OPS new announce format (#862)
* fix ops parsing extend regex capture group for torrentName var to contain releaseTags var replace all – in announces with a - for torrentName var * update ops yaml for new announces * replace en-dashes with hyphens for OPS add Sampler to releaseTypeMusic const sort strings of releaseTypeMusic const alphabetically shorten import in constants.ts * replace en-dashes in pattern with . to cover any separator --------- Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
This commit is contained in:
parent
9e2e43477d
commit
b0198bc2a3
3 changed files with 23 additions and 14 deletions
|
@ -199,6 +199,12 @@ func (a *announceProcessor) onLinesMatched(def *domain.IndexerDefinition, vars m
|
|||
return err
|
||||
}
|
||||
|
||||
// since OPS uses en-dashes as separators, which causes moistari/rls to not the torrentName properly,
|
||||
// we replace the en-dashes with hyphens here
|
||||
if def.Identifier == "ops" {
|
||||
rls.TorrentName = strings.ReplaceAll(rls.TorrentName, "–", "-")
|
||||
}
|
||||
|
||||
// parse fields
|
||||
// run before ParseMatch to not potentially use a reconstructed TorrentName
|
||||
rls.ParseString(rls.TorrentName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue