Add support for using freeleech tokens if available

This commit is contained in:
Daniel Mason 2025-07-11 10:12:43 +12:00
parent 74f777340e
commit 3656a68a27
Signed by: idanoo
GPG key ID: 387387CDBC02F132
28 changed files with 199 additions and 39 deletions

View file

@ -114,6 +114,7 @@ type Filter struct {
Bonus []string `json:"bonus,omitempty"`
Freeleech bool `json:"freeleech,omitempty"`
FreeleechPercent string `json:"freeleech_percent,omitempty"`
FreeleechToken bool `json:"freeleech_token,omitempty"`
SmartEpisode bool `json:"smart_episode"`
Shows string `json:"shows,omitempty"`
Seasons string `json:"seasons,omitempty"`
@ -248,6 +249,7 @@ type FilterUpdate struct {
Bonus *[]string `json:"bonus,omitempty"`
Freeleech *bool `json:"freeleech,omitempty"`
FreeleechPercent *string `json:"freeleech_percent,omitempty"`
FreeleechToken *bool `json:"freeleech_token,omitempty"`
SmartEpisode *bool `json:"smart_episode,omitempty"`
Shows *string `json:"shows,omitempty"`
Seasons *string `json:"seasons,omitempty"`

View file

@ -2087,6 +2087,7 @@ func TestFilter_CheckFilter1(t *testing.T) {
ExceptOrigins: tt.fields.ExceptOrigins,
Freeleech: tt.fields.Freeleech,
FreeleechPercent: tt.fields.FreeleechPercent,
FreeleechToken: tt.fields.FreeleechToken,
Shows: tt.fields.Shows,
Seasons: tt.fields.Seasons,
Episodes: tt.fields.Episodes,

View file

@ -47,6 +47,7 @@ type Macro struct {
FilterName string
Freeleech bool
FreeleechPercent int
FreeleechToken bool
Group string
GroupID string
HDR string

View file

@ -282,6 +282,7 @@ func TestRelease_DownloadTorrentFile(t *testing.T) {
ReleaseTags: tt.fields.ReleaseTags,
Freeleech: tt.fields.Freeleech,
FreeleechPercent: tt.fields.FreeleechPercent,
FreeleechToken: tt.fields.FreeleechToken,
Bonus: tt.fields.Bonus,
Uploader: tt.fields.Uploader,
PreTime: tt.fields.PreTime,