mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(releases): set freeleech percent 100 with freeleech bool (#872)
* feat(releases): set freeleech to freeleech percent 100 * fix(releases): check if freeleechpercent is gt 0
This commit is contained in:
parent
7cbcc2e14c
commit
956bccd69f
2 changed files with 41 additions and 35 deletions
|
@ -297,12 +297,13 @@ func TestRelease_MapVars(t *testing.T) {
|
|||
name: "2",
|
||||
fields: &Release{},
|
||||
want: &Release{
|
||||
TorrentName: "Good show S02 2160p ATVP WEB-DL DDP 5.1 Atmos DV HEVC-GROUP2",
|
||||
Category: "tv",
|
||||
Freeleech: true,
|
||||
Bonus: []string{"Freeleech"},
|
||||
Uploader: "Anon",
|
||||
Size: uint64(10000000000),
|
||||
TorrentName: "Good show S02 2160p ATVP WEB-DL DDP 5.1 Atmos DV HEVC-GROUP2",
|
||||
Category: "tv",
|
||||
Freeleech: true,
|
||||
FreeleechPercent: 100,
|
||||
Bonus: []string{"Freeleech"},
|
||||
Uploader: "Anon",
|
||||
Size: uint64(10000000000),
|
||||
},
|
||||
args: args{
|
||||
varMap: map[string]string{
|
||||
|
@ -475,13 +476,14 @@ func TestRelease_MapVars(t *testing.T) {
|
|||
name: "10",
|
||||
fields: &Release{},
|
||||
want: &Release{
|
||||
TorrentName: "Greatest Anime Ever",
|
||||
Year: 2022,
|
||||
Group: "GROUP1",
|
||||
Tags: []string{"comedy", "fantasy", "school.life", "shounen", "slice.of.life"},
|
||||
Uploader: "Tester",
|
||||
Freeleech: true,
|
||||
Bonus: []string{"Freeleech"},
|
||||
TorrentName: "Greatest Anime Ever",
|
||||
Year: 2022,
|
||||
Group: "GROUP1",
|
||||
Tags: []string{"comedy", "fantasy", "school.life", "shounen", "slice.of.life"},
|
||||
Uploader: "Tester",
|
||||
Freeleech: true,
|
||||
FreeleechPercent: 100,
|
||||
Bonus: []string{"Freeleech"},
|
||||
},
|
||||
args: args{varMap: map[string]string{
|
||||
"torrentName": "Greatest Anime Ever",
|
||||
|
@ -496,13 +498,14 @@ func TestRelease_MapVars(t *testing.T) {
|
|||
name: "11",
|
||||
fields: &Release{},
|
||||
want: &Release{
|
||||
TorrentName: "Good show S02 2160p ATVP WEB-DL DDP 5.1 Atmos DV HEVC-GROUP2",
|
||||
Category: "tv",
|
||||
Freeleech: true,
|
||||
Bonus: []string{"Freeleech"},
|
||||
Uploader: "Anon",
|
||||
Size: uint64(10000000000),
|
||||
Tags: []string{"comedy", "science fiction", "fantasy", "school.life", "shounen", "slice.of.life"},
|
||||
TorrentName: "Good show S02 2160p ATVP WEB-DL DDP 5.1 Atmos DV HEVC-GROUP2",
|
||||
Category: "tv",
|
||||
Freeleech: true,
|
||||
FreeleechPercent: 100,
|
||||
Bonus: []string{"Freeleech"},
|
||||
Uploader: "Anon",
|
||||
Size: uint64(10000000000),
|
||||
Tags: []string{"comedy", "science fiction", "fantasy", "school.life", "shounen", "slice.of.life"},
|
||||
},
|
||||
args: args{
|
||||
varMap: map[string]string{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue