fix(releases): parse missing source and misinterpreted group name (#1820)

fix(releases): parse missing source and groups
This commit is contained in:
ze0s 2024-11-23 15:08:58 +01:00 committed by GitHub
parent 50f1e4e7d5
commit c0882aff84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 162 additions and 0 deletions

View file

@ -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) {