ciderapp / Cider-2

Primary public repository for Cider 2.x
https://cider.sh
135 stars 2 forks source link

Last.fm integration is buggy #390

Closed n-1-c-k-y closed 9 months ago

n-1-c-k-y commented 10 months ago

Preflight Checklist

What operating system are you using?

Windows

Build Details

Cider 2.2.0 Latest Pre-Release

Operating System Version

Windows 11

Describe the Bug

When the album is by 'Various Artists,' it scrobbles with the artist as 'Various Artists' instead of the primary artist of the song. Most of the time, it doesn't remove the featured artists correctly, and some songs doesn't even scrobble. It also removes the featured artists on the Discord RPC (It shouldn't).

Cider_hUXM9JMoHF nicememe rufBpDdTOZ6L8kudMKR nicememe IhINm22erDvdGQIJXOo firefox_GQGbIJcV1K

Steps to Reproduce

  1. Enable Remove Featured Artists with "Artist List"
  2. Play one of these songs: https://music.apple.com/br/album/the-scotts/1509730426?i=1509730429, https://music.apple.com/br/song/1445949267, https://music.apple.com/br/album/better-days/1573415040?i=1573415045
  3. Check Last.fm

Anything else?

No response

Connect Device ID

No response

Build timestamp

No response

n-1-c-k-y commented 10 months ago

It's been an issue since June.

coredev-uk commented 10 months ago

Its very hard to remove the correct artist as using LastFM's correction API doesn't help because other services have already scrobbled the wrong data, so lastfm just returns whatever we give them. The remove featured config option just removes feat. using regex from the song name, and for the artist name we just run an api call to Apple to get the artist list returning the first one it gives us, which in most cases is wrong. If you have any other suggest/implementation that gets it right please share.

n-1-c-k-y commented 10 months ago

Its very hard to remove the correct artist as using LastFM's correction API doesn't help because other services have already scrobbled the wrong data, so lastfm just returns whatever we give them. The remove featured config option just removes feat. using regex from the song name, and for the artist name we just run an api call to Apple to get the artist list returning the first one it gives us, which in most cases is wrong. If you have any other suggest/implementation that gets it right please share.

can't you use the cider 1 method? it worked fine

n-1-c-k-y commented 10 months ago

You could try this, get the ID of the first artist with MusicKit.getInstance().nowPlayingItem.relationships.artists.data[0].id and make a request to the API to get the name of the artist (this is how it works in Cider 1, I think)

n-1-c-k-y commented 10 months ago

This fixes the issues I mentioned, apart from the issue with the Discord RPC