mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(actions): watch dir check torrent suffix (#540)
Update run.go Make conditional for generating random torrent name more specific
This commit is contained in:
parent
51b0883786
commit
4b7e393ce9
1 changed files with 2 additions and 1 deletions
|
@ -91,6 +91,7 @@ func (s *service) RunAction(action *domain.Action, release domain.Release) ([]st
|
||||||
Filter: release.Filter.Name,
|
Filter: release.Filter.Name,
|
||||||
Indexer: release.Indexer,
|
Indexer: release.Indexer,
|
||||||
InfoHash: release.TorrentHash,
|
InfoHash: release.TorrentHash,
|
||||||
|
|
||||||
Size: release.Size,
|
Size: release.Size,
|
||||||
Status: domain.ReleasePushStatusApproved,
|
Status: domain.ReleasePushStatusApproved,
|
||||||
Action: action.Name,
|
Action: action.Name,
|
||||||
|
@ -177,7 +178,7 @@ func (s *service) watchFolder(action domain.Action, release domain.Release) erro
|
||||||
newFileName := watchFolderArgs
|
newFileName := watchFolderArgs
|
||||||
|
|
||||||
// if watchFolderArgs does not contain .torrent, create
|
// if watchFolderArgs does not contain .torrent, create
|
||||||
if !strings.Contains(watchFolderArgs, ".torrent") {
|
if !strings.HasSuffix(watchFolderArgs, ".torrent") {
|
||||||
_, tmpFileName := filepath.Split(release.TorrentTmpFile)
|
_, tmpFileName := filepath.Split(release.TorrentTmpFile)
|
||||||
|
|
||||||
newFileName = filepath.Join(watchFolderArgs, tmpFileName+".torrent")
|
newFileName = filepath.Join(watchFolderArgs, tmpFileName+".torrent")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue