Skip to content

Commit

Permalink
feat(filters): add sources and codecs (#1470)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
martylukyy committed Mar 24, 2024
1 parent 2337ee4 commit 6045ef7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 13 deletions.
32 changes: 32 additions & 0 deletions internal/domain/release_test.go
Expand Up @@ -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{
Expand Down
28 changes: 15 additions & 13 deletions web/src/domain/constants.ts
Expand Up @@ -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",
Expand All @@ -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 }));
Expand Down

0 comments on commit 6045ef7

Please sign in to comment.