mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix: empty tmpFile var passed to download client's action (#121)
Co-authored-by: zmiguel <contact@zmiguel.me>
This commit is contained in:
parent
8c9f9495ba
commit
6da581bf92
1 changed files with 11 additions and 0 deletions
|
@ -64,6 +64,8 @@ func (s *service) runAction(action domain.Action, release domain.Release) error
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpFile = t.TmpFileName
|
tmpFile = t.TmpFileName
|
||||||
|
} else {
|
||||||
|
tmpFile = release.TorrentTmpFile
|
||||||
}
|
}
|
||||||
|
|
||||||
s.execCmd(release, action, tmpFile)
|
s.execCmd(release, action, tmpFile)
|
||||||
|
@ -77,7 +79,10 @@ func (s *service) runAction(action domain.Action, release domain.Release) error
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpFile = t.TmpFileName
|
tmpFile = t.TmpFileName
|
||||||
|
} else {
|
||||||
|
tmpFile = release.TorrentTmpFile
|
||||||
}
|
}
|
||||||
|
|
||||||
s.watchFolder(action.WatchFolder, tmpFile)
|
s.watchFolder(action.WatchFolder, tmpFile)
|
||||||
|
|
||||||
case domain.ActionTypeDelugeV1, domain.ActionTypeDelugeV2:
|
case domain.ActionTypeDelugeV1, domain.ActionTypeDelugeV2:
|
||||||
|
@ -98,7 +103,10 @@ func (s *service) runAction(action domain.Action, release domain.Release) error
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpFile = t.TmpFileName
|
tmpFile = t.TmpFileName
|
||||||
|
} else {
|
||||||
|
tmpFile = release.TorrentTmpFile
|
||||||
}
|
}
|
||||||
|
|
||||||
err = s.deluge(action, tmpFile)
|
err = s.deluge(action, tmpFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Stack().Err(err).Msg("error sending torrent to Deluge")
|
log.Error().Stack().Err(err).Msg("error sending torrent to Deluge")
|
||||||
|
@ -124,7 +132,10 @@ func (s *service) runAction(action domain.Action, release domain.Release) error
|
||||||
|
|
||||||
tmpFile = t.TmpFileName
|
tmpFile = t.TmpFileName
|
||||||
hash = t.MetaInfo.HashInfoBytes().String()
|
hash = t.MetaInfo.HashInfoBytes().String()
|
||||||
|
} else {
|
||||||
|
tmpFile = release.TorrentTmpFile
|
||||||
}
|
}
|
||||||
|
|
||||||
err = s.qbittorrent(client, action, hash, tmpFile)
|
err = s.qbittorrent(client, action, hash, tmpFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Stack().Err(err).Msg("error sending torrent to qBittorrent")
|
log.Error().Stack().Err(err).Msg("error sending torrent to qBittorrent")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue