mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(macros): add SizeString DownloadURL and InfoURL (#1080)
* feat(macro): add new variables * SizeString * DownloadURL * InfoURL * feat(macro): add new test cases
This commit is contained in:
parent
63660946eb
commit
1bfbe38335
17 changed files with 86 additions and 52 deletions
|
@ -129,7 +129,7 @@ func (s *service) delugeV1(ctx context.Context, client *domain.DownloadClient, a
|
|||
|
||||
torrentHash, err := del.AddTorrentMagnet(ctx, release.MagnetURI, &options)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not add torrent magnet %s to client: %s", release.TorrentURL, client.Name)
|
||||
return nil, errors.Wrap(err, "could not add torrent magnet %s to client: %s", release.MagnetURI, client.Name)
|
||||
}
|
||||
|
||||
if action.Label != "" {
|
||||
|
@ -242,7 +242,7 @@ func (s *service) delugeV2(ctx context.Context, client *domain.DownloadClient, a
|
|||
|
||||
torrentHash, err := del.AddTorrentMagnet(ctx, release.MagnetURI, &options)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not add torrent magnet %s to client: %s", release.TorrentURL, client.Name)
|
||||
return nil, errors.Wrap(err, "could not add torrent magnet %s to client: %s", release.MagnetURI, client.Name)
|
||||
}
|
||||
|
||||
if action.Label != "" {
|
||||
|
|
|
@ -47,7 +47,7 @@ func (s *service) lidarr(ctx context.Context, action *domain.Action, release dom
|
|||
|
||||
r := lidarr.Release{
|
||||
Title: release.TorrentName,
|
||||
DownloadUrl: release.TorrentURL,
|
||||
DownloadUrl: release.DownloadURL,
|
||||
MagnetUrl: release.MagnetURI,
|
||||
Size: int64(release.Size),
|
||||
Indexer: release.Indexer,
|
||||
|
|
|
@ -46,7 +46,7 @@ func (s *service) radarr(ctx context.Context, action *domain.Action, release dom
|
|||
|
||||
r := radarr.Release{
|
||||
Title: release.TorrentName,
|
||||
DownloadUrl: release.TorrentURL,
|
||||
DownloadUrl: release.DownloadURL,
|
||||
MagnetUrl: release.MagnetURI,
|
||||
Size: int64(release.Size),
|
||||
Indexer: release.Indexer,
|
||||
|
|
|
@ -46,7 +46,7 @@ func (s *service) readarr(ctx context.Context, action *domain.Action, release do
|
|||
|
||||
r := readarr.Release{
|
||||
Title: release.TorrentName,
|
||||
DownloadUrl: release.TorrentURL,
|
||||
DownloadUrl: release.DownloadURL,
|
||||
MagnetUrl: release.MagnetURI,
|
||||
Size: int64(release.Size),
|
||||
Indexer: release.Indexer,
|
||||
|
|
|
@ -42,7 +42,7 @@ func (s *service) sabnzbd(ctx context.Context, action *domain.Action, release do
|
|||
|
||||
sab := sabnzbd.New(opts)
|
||||
|
||||
ids, err := sab.AddFromUrl(ctx, sabnzbd.AddNzbRequest{Url: release.TorrentURL, Category: action.Category})
|
||||
ids, err := sab.AddFromUrl(ctx, sabnzbd.AddNzbRequest{Url: release.DownloadURL, Category: action.Category})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not add nzb to sabnzbd")
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ func (s *service) sonarr(ctx context.Context, action *domain.Action, release dom
|
|||
|
||||
r := sonarr.Release{
|
||||
Title: release.TorrentName,
|
||||
DownloadUrl: release.TorrentURL,
|
||||
DownloadUrl: release.DownloadURL,
|
||||
MagnetUrl: release.MagnetURI,
|
||||
Size: int64(release.Size),
|
||||
Indexer: release.Indexer,
|
||||
|
|
|
@ -46,7 +46,7 @@ func (s *service) whisparr(ctx context.Context, action *domain.Action, release d
|
|||
|
||||
r := whisparr.Release{
|
||||
Title: release.TorrentName,
|
||||
DownloadUrl: release.TorrentURL,
|
||||
DownloadUrl: release.DownloadURL,
|
||||
MagnetUrl: release.MagnetURI,
|
||||
Size: int64(release.Size),
|
||||
Indexer: release.Indexer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue