mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
Feature: Save releases (#36)
* chore: tidy deps * refactor: database migration * refactor: store release * refactor: save release * chore: add packages * feat(web): show stats and recent releases * refactor: simply filter struct * feat: add eventbus * chore: cleanup logging * chore: update packages
This commit is contained in:
parent
d22dd2fe84
commit
7177e48c02
40 changed files with 5859 additions and 3328 deletions
|
@ -10,8 +10,8 @@ import (
|
|||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func (s *service) execCmd(announce domain.Announce, action domain.Action, torrentFile string) {
|
||||
log.Debug().Msgf("action exec: %v release: %v", action.Name, announce.TorrentName)
|
||||
func (s *service) execCmd(release domain.Release, action domain.Action, torrentFile string) {
|
||||
log.Debug().Msgf("action exec: %v release: %v", action.Name, release.TorrentName)
|
||||
|
||||
// check if program exists
|
||||
cmd, err := exec.LookPath(action.ExecCmd)
|
||||
|
@ -22,9 +22,9 @@ func (s *service) execCmd(announce domain.Announce, action domain.Action, torren
|
|||
|
||||
// handle args and replace vars
|
||||
m := Macro{
|
||||
TorrentName: announce.TorrentName,
|
||||
TorrentName: release.TorrentName,
|
||||
TorrentPathName: torrentFile,
|
||||
TorrentUrl: announce.TorrentUrl,
|
||||
TorrentUrl: release.TorrentURL,
|
||||
}
|
||||
|
||||
// parse and replace values in argument string before continuing
|
||||
|
@ -53,5 +53,5 @@ func (s *service) execCmd(announce domain.Announce, action domain.Action, torren
|
|||
|
||||
duration := time.Since(start)
|
||||
|
||||
log.Info().Msgf("executed command: '%v', args: '%v' %v,%v, total time %v", cmd, parsedArgs, announce.TorrentName, announce.Site, duration)
|
||||
log.Info().Msgf("executed command: '%v', args: '%v' %v,%v, total time %v", cmd, parsedArgs, release.TorrentName, release.Indexer, duration)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue