mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(indexers): add HUNO (#533)
This commit is contained in:
parent
1b6fd01575
commit
14ecaa530e
3 changed files with 95 additions and 0 deletions
|
@ -488,6 +488,13 @@ func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) erro
|
|||
}
|
||||
}
|
||||
|
||||
if internal, err := getStringMapValue(varMap, "internal"); err == nil {
|
||||
i := StringEqualFoldMulti(internal, "internal", "yes", "1")
|
||||
if i {
|
||||
r.Origin = "INTERNAL"
|
||||
}
|
||||
}
|
||||
|
||||
if yearVal, err := getStringMapValue(varMap, "year"); err == nil {
|
||||
year, err := strconv.Atoi(yearVal)
|
||||
if err != nil {
|
||||
|
|
|
@ -243,6 +243,25 @@ func TestRelease_Parse(t *testing.T) {
|
|||
Other: []string{"HYBRiD", "REMUX"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "parse_title_1",
|
||||
fields: Release{
|
||||
TorrentName: "The Peripheral (2022) S01 (2160p AMZN WEB-DL H265 HDR10+ DDP 5.1 English - GROUP1)",
|
||||
},
|
||||
want: Release{
|
||||
TorrentName: "The Peripheral (2022) S01 (2160p AMZN WEB-DL H265 HDR10+ DDP 5.1 English - GROUP1)",
|
||||
Title: "The Peripheral",
|
||||
Resolution: "2160p",
|
||||
Source: "WEB-DL",
|
||||
Codec: []string{"H.265"},
|
||||
HDR: []string{"HDR10+"},
|
||||
Audio: []string{"DDP"},
|
||||
AudioChannels: "5.1",
|
||||
Year: 2022,
|
||||
Group: "GROUP1",
|
||||
Season: 1,
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue