feat(filters): add sources and codecs (#1470)

* feat(filters): add AHDTV to sources and sort alphabetically
feat(filters): add MPEG-2 to codecs and sort alphabetically

* feat(filters): add release parsing test for MPEG-2
This commit is contained in:
martylukyy 2024-03-24 10:41:24 +01:00 committed by GitHub
parent 2337ee4d75
commit 6045ef7c10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 47 additions and 13 deletions

View file

@ -150,6 +150,38 @@ func TestRelease_Parse(t *testing.T) {
Type: "series", Type: "series",
}, },
}, },
{
name: "parse_8",
fields: Release{
TorrentName: "Rippers.Revenge.2023.German.DL.1080p.BluRay.MPEG2-GROUP",
},
want: Release{
TorrentName: "Rippers.Revenge.2023.German.DL.1080p.BluRay.MPEG2-GROUP",
Title: "Rippers Revenge",
Year: 2023,
Language: []string{"GERMAN", "DL"},
Resolution: "1080p",
Source: "BluRay",
Codec: []string{"MPEG-2"},
Group: "GROUP",
Type: "movie",
},
},
{
name: "parse_7",
fields: Release{
TorrentName: "Analogue.1080i.AHDTV.H264-ABCDEF",
},
want: Release{
TorrentName: "Analogue.1080i.AHDTV.H264-ABCDEF",
Title: "Analogue",
Resolution: "1080p", // rls does not differenciate between 1080i and 1080p which results in all 1080 releases being parsed as 1080p
Source: "AHDTV",
Codec: []string{"H.264"},
Group: "ABCDEF",
Type: "movie",
},
},
{ {
name: "parse_music_1", name: "parse_music_1",
fields: Release{ fields: Release{

View file

@ -19,30 +19,28 @@ export const resolutions = [
export const RESOLUTION_OPTIONS: MultiSelectOption[] = resolutions.map(r => ({ value: r, label: r, key: r })); export const RESOLUTION_OPTIONS: MultiSelectOption[] = resolutions.map(r => ({ value: r, label: r, key: r }));
export const codecs = [ export const codecs = [
"HEVC", "AV1",
"AVC",
"H.264", "H.264",
"H.265", "H.265",
"x264", "HEVC",
"x265", "MPEG-2",
"AVC",
"VC-1", "VC-1",
"AV1", "XviD",
"XviD" "x264",
"x265"
]; ];
export const CODECS_OPTIONS: MultiSelectOption[] = codecs.map(v => ({ value: v, label: v, key: v })); export const CODECS_OPTIONS: MultiSelectOption[] = codecs.map(v => ({ value: v, label: v, key: v }));
export const sources = [ export const sources = [
"BluRay", "AHDTV",
"UHD.BluRay",
"WEB-DL",
"WEB",
"WEBRip",
"BD5", "BD5",
"BD9", "BD9",
"BDr",
"BDRip", "BDRip",
"BDr",
"BRRip", "BRRip",
"BluRay",
"CAM", "CAM",
"DVDR", "DVDR",
"DVDRip", "DVDRip",
@ -53,7 +51,11 @@ export const sources = [
"HDTS", "HDTS",
"HDTV", "HDTV",
"Mixed", "Mixed",
"SiteRip" "SiteRip",
"UHD.BluRay",
"WEB",
"WEB-DL",
"WEBRip"
]; ];
export const SOURCES_OPTIONS: MultiSelectOption[] = sources.map(v => ({ value: v, label: v, key: v })); export const SOURCES_OPTIONS: MultiSelectOption[] = sources.map(v => ({ value: v, label: v, key: v }));