Skip to content

Commit 4bd1630

Browse files
authored
feat: Detect remix based on the release title
1 parent e8a713c commit 4bd1630

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

harmonizer/release_types.test.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,56 @@ describe('release types', () => {
8484
title,
8585
new Set(['Soundtrack']),
8686
])),
87+
// Remix releases
88+
...([
89+
'Human (Paul Woolford Remix)',
90+
'Paper Romance (Purple Disco Machine Remix - Edit)',
91+
'Paper Romance (Purple Disco Machine Remix) [Edit]',
92+
'Paper Romance (Purple Disco Machine Remix) (Edit)',
93+
'Paper Romance (Purple Disco Machine Remix; Edit)',
94+
"Stay (Don't Go Away) [feat. Raye] [Nicky Romero Remix]",
95+
'Anti‐Hero (Kungs remix extended version)',
96+
'Remix',
97+
'Anti‐Hero (Remixes)',
98+
'The One (feat. Daddy Yankee) [The Remixes]',
99+
'The Remixes',
100+
'The Remixes - Vol.1',
101+
'The Remixes, Pt. 1',
102+
'Remixes',
103+
'Remixes 81>04',
104+
'Never Say Never - The Remixes',
105+
'Skin: The Remixes',
106+
'The Hills Remixes',
107+
'MIDI Kittyy - The Remixes Vol 1',
108+
'The Slow Rush B-Sides & Remixes',
109+
'Remixed',
110+
'Remixed (2003 Remaster)',
111+
'Remixed Sides',
112+
'Remixed: The Definitive Collection',
113+
'The Hits: Remixed',
114+
'Remixed & Revisited',
115+
'Revived Remixed Revisited',
116+
'Welcome To My World (Remixed)',
117+
'Mörkrets Narr Remixed',
118+
].map((
119+
title,
120+
): FunctionSpec<typeof guessTypesFromTitle>[number] => [
121+
`should detect remix type (${title})`,
122+
title,
123+
new Set(['Remix']),
124+
])),
125+
['should not treat a premix as remix', 'Wild (premix version)', new Set()],
126+
// Multiple types
127+
[
128+
'should detect both remix and soundtrack type',
129+
'The Sims 2: Nightlife (Remixes) (Original Soundtrack)',
130+
new Set(['Remix', 'Soundtrack']),
131+
],
132+
[
133+
'should detect both remix and soundtrack type',
134+
'Remixes - EP',
135+
new Set(['EP', 'Remix']),
136+
],
87137
];
88138

89139
const passingCaseSensitiveCases: FunctionSpec<typeof guessTypesFromTitle> = [

harmonizer/release_types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ const releaseGroupTypeMatchers: Array<{ type?: ReleaseGroupType; pattern: RegExp
1818
{ pattern: /\s- (EP|Single|Live)(?:\s\(.*?\))?$/i },
1919
// Generic "EP" suffix
2020
{ pattern: /\s(EP)(?:\s\(.*?\))?$/i },
21+
// Common remix title: "Remixed", "The Remixes", or "<Track name> (<Remixer> remix)".
22+
{ pattern: /\b(Remix)(?:e[sd])?\b/i },
2123
// Common soundtrack title: "Official/Original <Medium> Soundtrack" and "Original Score"
2224
{
2325
type: 'Soundtrack',

0 commit comments

Comments
 (0)