mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
fix(releases): parse missing source and misinterpreted group name (#1820)
fix(releases): parse missing source and groups
This commit is contained in:
parent
50f1e4e7d5
commit
c0882aff84
4 changed files with 162 additions and 0 deletions
|
@ -338,6 +338,85 @@ func TestRelease_Parse(t *testing.T) {
|
|||
Type: "series",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "parse_missing_source",
|
||||
fields: Release{
|
||||
TorrentName: "Old Movie 1954 2160p Remux DoVi HDR10 HEVC DTS-HD MA 5.1-CiNEPHiLES",
|
||||
},
|
||||
want: Release{
|
||||
TorrentName: "Old Movie 1954 2160p Remux DoVi HDR10 HEVC DTS-HD MA 5.1-CiNEPHiLES",
|
||||
Title: "Old Movie",
|
||||
Year: 1954,
|
||||
Source: "UHD.BluRay",
|
||||
Resolution: "2160p",
|
||||
Other: []string{"REMUX"},
|
||||
HDR: []string{"DV", "HDR10"},
|
||||
Codec: []string{"HEVC"},
|
||||
Audio: []string{"DTS-HD.MA"},
|
||||
AudioChannels: "5.1",
|
||||
Group: "CiNEPHiLES",
|
||||
Type: "movie",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "parse_missing_source",
|
||||
fields: Release{
|
||||
TorrentName: "Death Hunt 1981 1080p Remux AVC DTS-HD MA 2.0-playBD",
|
||||
},
|
||||
want: Release{
|
||||
TorrentName: "Death Hunt 1981 1080p Remux AVC DTS-HD MA 2.0-playBD",
|
||||
Title: "Death Hunt",
|
||||
Year: 1981,
|
||||
Source: "BluRay",
|
||||
Resolution: "1080p",
|
||||
Other: []string{"REMUX"},
|
||||
Codec: []string{"AVC"},
|
||||
Audio: []string{"DTS-HD.MA"},
|
||||
AudioChannels: "2.0",
|
||||
Group: "playBD",
|
||||
Type: "movie",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "parse_confusing_group",
|
||||
fields: Release{
|
||||
TorrentName: "Old Movie 1954 2160p Remux DoVi HDR10 HEVC DTS-HD MA 5.1-VHS",
|
||||
},
|
||||
want: Release{
|
||||
TorrentName: "Old Movie 1954 2160p Remux DoVi HDR10 HEVC DTS-HD MA 5.1-VHS",
|
||||
Title: "Old Movie",
|
||||
Year: 1954,
|
||||
Source: "UHD.BluRay",
|
||||
Resolution: "2160p",
|
||||
Other: []string{"REMUX"},
|
||||
HDR: []string{"DV", "HDR10"},
|
||||
Codec: []string{"HEVC"},
|
||||
Audio: []string{"DTS-HD.MA"},
|
||||
AudioChannels: "5.1",
|
||||
Group: "VHS",
|
||||
Type: "movie",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "parse_confusing_group",
|
||||
fields: Release{
|
||||
TorrentName: "Old Movie 1954 2160p Remux DoVi HDR10 HEVC DTS-HD MA 5.1 VHS",
|
||||
},
|
||||
want: Release{
|
||||
TorrentName: "Old Movie 1954 2160p Remux DoVi HDR10 HEVC DTS-HD MA 5.1 VHS",
|
||||
Title: "Old Movie",
|
||||
Year: 1954,
|
||||
Source: "UHD.BluRay",
|
||||
Resolution: "2160p",
|
||||
Other: []string{"REMUX"},
|
||||
HDR: []string{"DV", "HDR10"},
|
||||
Codec: []string{"HEVC"},
|
||||
Audio: []string{"DTS-HD.MA"},
|
||||
AudioChannels: "5.1",
|
||||
Group: "VHS",
|
||||
Type: "movie",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue