Closed phw closed 4 months ago
@kellnerd I think I have now addressed most issues and this is usable. This has become much more complex than I had originally anticipated.
I have implemented sorting the types with primary type first in 0f08a807935dde96f4ec66dcc5917aff33703a4e and a merging algorithm in d9db1f1735dd3a3d898c16683209c7cc55170151 . The merging takes the secondary types as given, but for the primary types keeps only one. It prefers more specific types over "Other" or "Album", and it prefers "EP" over "Single" (as e.g. Spotify has not EP, just Single, and EP is usually the more specific classification). This overly seems to work quite well and I have even allowed the "Album" type from Deezer, Spotify and Tidal again, as you suggested.
- Apply the guessing functions once after merging. Unless there are any issues with this approach, it would be my favourite because it is more efficient and we could display the "original source values" (without guessed values) as alternative values on the website.
The final release merging now runs guessTypesForRelease
always after type merging, see 5a7cd1b4822fbe87a41675520208c0d49dedfbe2 . This is very helpful especially when detecting live releases, but also helps with EPs.
I'm unsure how to go about the "original source values" , but maybe we can move this to a separate PR. This one is already big enough.
Also I'm unsure whether we need to do something about preferSameProvider
in merge.ts
(https://github.com/kellnerd/harmony/blob/main/harmonizer/merge.ts#L146-L148). In the current implementation the types get merged across all releases regardless. This is essentially the same as regions are handled as well. But maybe this is unexpected if preferSameProvider
is true. I'm not sure about the wanted behavior here.
@kellnerd I think I addressed all your latest comments.
This adds support for release group types, see #15. I'm not fully sure this is ready to go, there are some loose ends, so I open this as a draft.
Some notes:
- Single
and- EP
suffixes used there and also removed them (this closes #9)For discussion:
convertRawRelease
?