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