feat(actions): reduce metadata downloads (#341)

This commit is contained in:
Ludvig Lundgren 2022-07-10 15:55:13 +02:00 committed by GitHub
parent ebba72ec1f
commit 548cd382a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -2,6 +2,7 @@ package action
import (
"os/exec"
"strings"
"time"
"github.com/autobrr/autobrr/internal/domain"
@ -13,7 +14,7 @@ import (
func (s *service) execCmd(action domain.Action, release domain.Release) error {
s.log.Debug().Msgf("action exec: %v release: %v", action.Name, release.TorrentName)
if release.TorrentTmpFile == "" {
if release.TorrentTmpFile == "" && strings.Contains(action.ExecArgs, "TorrentPathName") {
if err := release.DownloadTorrentFile(); err != nil {
return errors.Wrap(err, "error downloading torrent file for release: %v", release.TorrentName)
}