feat(indexers): improve RED and OPS artist parsing (#629)

* feat(indexers): improve RED and OPS artist parsing

* feat(indexers): deprecate lidarr red ops workaround

* feat(indexers): change artist and album field check

* seperator before tags and tags optional for red

* fix: update rejection msg

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
This commit is contained in:
ze0s 2023-01-08 15:06:04 +01:00 committed by GitHub
parent 12d05f0748
commit 08826db036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 13 deletions

View file

@ -2,7 +2,6 @@ package action
import (
"context"
"fmt"
"time"
"github.com/autobrr/autobrr/internal/domain"
@ -53,12 +52,6 @@ func (s *service) lidarr(ctx context.Context, action *domain.Action, release dom
PublishDate: time.Now().Format(time.RFC3339),
}
// special handling for RED and OPS because their torrent names contain to little info
// "Artist - Album" is not enough for Lidarr to make a decision. It needs year like "Artist - Album 2022"
if release.Indexer == "redacted" || release.Indexer == "ops" {
r.Title = fmt.Sprintf("%v (%d)", release.TorrentName, release.Year)
}
rejections, err := arr.Push(ctx, r)
if err != nil {
s.log.Error().Err(err).Msgf("lidarr: failed to push release: %v", r)