Conversation
|
Some albums with a lot of featuring artists for testing: |
kellnerd
left a comment
There was a problem hiding this comment.
Wow, that was fast...
Originally I wanted to continue working on my Discogs provider today, then I decided to give you some quick initial feedback first, but in the end I found a few more things 😅
| } | ||
|
|
||
| override getLinkTypesForEntity(): LinkType[] { | ||
| return ['paid streaming', 'paid download']; |
There was a problem hiding this comment.
Is this correct, do they have downloads?
There was a problem hiding this comment.
Yup, though I need to add validation for which tracks do, since all tracks marked as 'overseas' don't
| }) | ||
| } | ||
|
|
||
| private async getTrackArtists(rawTrack: NaverTrack): Promise<ArtistCreditName[]> { |
There was a problem hiding this comment.
It's hard to follow what is happening here... I would like to see some test cases for this function to see what it is supposed to do and if it can be written in a more obvious way. For example, I also have the feeling that we don't have to distinguish between participants and artists in the end and can have one function which converts artists with optional join phrases but I don't feel confident to try without having test coverage.
There was a problem hiding this comment.
Where all other providers (minus Apple and tidal apparently) would provide all participating main track credits, Naver does not and instead moves featuring artists exclusively to the /credits endpoint for tracks
See: https://harmony.pulsewidth.org.uk/release?url=>in=0692788693392®ion=&musicbrainz=&deezer=&itunes=&spotify=&tidal= for the album on other services
The album tracks fetch here: album/34923420/tracks.json omits the featuring artists, so they have to be fetched with track/96143271/credits.json (track/96143271.json returns the same thing as the album tracks fetch). But /credits also returns all artist roles, including non-participating roles which can be seen here
There was a problem hiding this comment.
I should probably make a helper function to generate the join phrases for the artists, since vibe does distinguish between featuring artists and main artists, unlike most other providers
There was a problem hiding this comment.
What the logic is currently doing:
- Check if the track title has an indicator of featuring artists to attempt to save on extra calls; Can be removed if unreliable
if (!trackFeatVariations.some((fv) => rawTrack.trackTitle.toLocaleLowerCase().includes(fv))) { - Fetch track credits
const trackCredits = await this.getRawTrackCredits(rawTrack.trackId); - Filter out featuring artists
const featuringArtists = roles.filter((role) => role.roleName === '피쳐링').flatMap((role) => role.participantList); - Store the ids of the featuring artists
const featuringIds = featuringArtists.map((artist) => artist.id); - Combine and de duplicate all artists
typescript const uniqueArtists = Array.from(new Map(allArtists.map((artist) => [artist.id, artist])).values()); - Use a forEach loop to check the positions of the nearby artists to generate the joinPhrases & map to convertRawParticipant
- Return credits
I want to make a helper function that replaces the job of step 6
Got bored and decided to implement VIBE as well...
Might want to take a look at here in particular: https://github.com/kellnerd/harmony/compare/main...Lioncat6:harmony:vibe?expand=1#diff-994ea9806a6ec65de9b9322a6997658f145c4b9a0fc8e88570a249f0a6f34970R145-R258
Closes #208