feat(indexers): add External Identifier to map with ARR indexers (#1534)

* feat(indexers): add External Identifier to map with ARR indexers

* fix: web build

* fix: tests

* feat: set identifier for manual processing
This commit is contained in:
ze0s 2024-05-04 12:37:01 +02:00 committed by GitHub
parent ad6ef228ec
commit 0016228d89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 254 additions and 197 deletions

View file

@ -82,9 +82,10 @@ func Test_service_execCmd(t *testing.T) {
TorrentName: "This is a test",
TorrentTmpFile: "tmp-10000",
Indexer: domain.IndexerMinimal{
ID: 0,
Name: "Mock Indexer",
Identifier: "mock",
ID: 0,
Name: "Mock Indexer",
Identifier: "mock",
IdentifierExternal: "Mock Indexer",
},
},
action: &domain.Action{

View file

@ -59,7 +59,7 @@ func (s *service) lidarr(ctx context.Context, action *domain.Action, release dom
DownloadUrl: release.DownloadURL,
MagnetUrl: release.MagnetURI,
Size: int64(release.Size),
Indexer: release.Indexer.Identifier,
Indexer: release.Indexer.IdentifierExternal,
DownloadClientId: externalClientId,
DownloadClient: externalClient,
DownloadProtocol: string(release.Protocol),

View file

@ -58,7 +58,7 @@ func (s *service) radarr(ctx context.Context, action *domain.Action, release dom
DownloadUrl: release.DownloadURL,
MagnetUrl: release.MagnetURI,
Size: int64(release.Size),
Indexer: release.Indexer.Identifier,
Indexer: release.Indexer.IdentifierExternal,
DownloadClientId: externalClientId,
DownloadClient: externalClient,
DownloadProtocol: string(release.Protocol),

View file

@ -58,7 +58,7 @@ func (s *service) readarr(ctx context.Context, action *domain.Action, release do
DownloadUrl: release.DownloadURL,
MagnetUrl: release.MagnetURI,
Size: int64(release.Size),
Indexer: release.Indexer.Identifier,
Indexer: release.Indexer.IdentifierExternal,
DownloadClientId: externalClientId,
DownloadClient: externalClient,
DownloadProtocol: string(release.Protocol),

View file

@ -58,7 +58,7 @@ func (s *service) sonarr(ctx context.Context, action *domain.Action, release dom
DownloadUrl: release.DownloadURL,
MagnetUrl: release.MagnetURI,
Size: int64(release.Size),
Indexer: release.Indexer.Identifier,
Indexer: release.Indexer.IdentifierExternal,
DownloadClientId: externalClientId,
DownloadClient: externalClient,
DownloadProtocol: string(release.Protocol),

View file

@ -58,7 +58,7 @@ func (s *service) whisparr(ctx context.Context, action *domain.Action, release d
DownloadUrl: release.DownloadURL,
MagnetUrl: release.MagnetURI,
Size: int64(release.Size),
Indexer: release.Indexer.Identifier,
Indexer: release.Indexer.IdentifierExternal,
DownloadClientId: externalClientId,
DownloadClient: externalClient,
DownloadProtocol: string(release.Protocol),