Very minor issue
TL;DR
Harmony’s release type detection can fall short for EPs with titles like “Down Under EP Vol 1” when no provider thinks it’s an EP and the title doesn’t end with “EP”
https://harmony.pulsewidth.org.uk/release?beatport=5290432&spotify=2BvTnnBYLzd5Qd1VRk7IBC>in=663918457177&deezer=®ion=US&ts=1756579182
Long version generated by AI
Analysis of Release Type Classification for “Down Under EP Vol 1”
1. Observation
The release titled “Down Under EP Vol 1” was expected to be classified as an EP due to the presence of “EP” in its title. However, the Harmony application ultimately classified it as a Single. This report details the technical reasons for this outcome based on an analysis of the Harmony source code.
2. Findings
The classification is the result of two key mechanisms in Harmony’s logic: the specificity of its title-parsing rules and its process for merging conflicting data from different music providers.
2.1. Specificity of the Title Guessing Logic
Harmony attempts to guess a release’s type by matching its title against a set of predefined regular expressions. This logic is located in harmonizer/release_types.ts .
The specific pattern used to detect a generic EP is as follows:
/\s(EP)(?:\s\(.*?\))?$/i,
The critical component here is the $ at the end of the expression. This is a special character in regular expressions that anchors the pattern to the end of the string .
Because the title “Down Under EP Vol 1” has " Vol 1" after “EP”, it does not match this pattern. As the term “EP” is not at the very end of the title, the title analysis does not contribute “EP” as a possible release type.
2.2. Provider Data Conflict Resolution
Since the title analysis did not return “EP” as a type, Harmony fell back to the data provided by the music services. According to the “Alternative Values” section on the release page, Harmony received conflicting information:
- Spotify classified the release as a
Single .
- Deezer classified the release as an
Album .
To resolve these conflicts, Harmony uses a merging function, reducePrimaryTypes , also found in harmonizer/release_types.ts . This function establishes a clear hierarchy for release types.
if (previous == 'Album' || previous == 'Other') {
// Prefer more specific types over Album or Other. Many providers use Album
// as the generic type.
return current;
}
This logic dictates that a more specific type like Single will always be preferred over a generic type like Album . Consequently, when merging the data from Spotify and Deezer, “Single” was chosen as the definitive type for the release.
3. Conclusion
The classification of “Down Under EP Vol 1” as a Single is the correct and expected behavior according to Harmony’s current codebase. The title-based detection did not match due to a specific regular expression pattern, and the subsequent merging logic correctly prioritized the more specific Single type provided by Spotify over the more generic Album type from Deezer. This illustrates an edge case where the current heuristics may not capture every possible title variation for EPs.
Shameless plug
I also released an updated version of my Harmony enhancements script that looks for “EP” not only at the end of the release title