mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat: improve release parsing and filtering (#257)
* feat(releases): improve parsing * refactor: extend filtering add more tests * feat: improve macro * feat: add and remove fields * feat: add freeleech percent to bonus * feat: filter by origin
This commit is contained in:
parent
bb62e724a1
commit
e6c151a029
26 changed files with 3210 additions and 3201 deletions
|
@ -2,6 +2,7 @@ package action
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"strings"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
|
@ -14,6 +15,7 @@ type Macro struct {
|
|||
TorrentHash string
|
||||
TorrentUrl string
|
||||
Indexer string
|
||||
Title string
|
||||
Resolution string
|
||||
Source string
|
||||
HDR string
|
||||
|
@ -36,9 +38,10 @@ func NewMacro(release domain.Release) Macro {
|
|||
TorrentPathName: release.TorrentTmpFile,
|
||||
TorrentHash: release.TorrentHash,
|
||||
Indexer: release.Indexer,
|
||||
Title: release.Title,
|
||||
Resolution: release.Resolution,
|
||||
Source: release.Source,
|
||||
HDR: release.HDR,
|
||||
HDR: strings.Join(release.HDR, ", "),
|
||||
Season: release.Season,
|
||||
Episode: release.Episode,
|
||||
Year: currentTime.Year(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue