ciderapp / Cider-2

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

[Bug]: Shuffled songs from title library are not getting tracked by musickit sometimes #560

Closed UnbreakCode closed 21 hours ago

UnbreakCode commented 4 months ago

Preflight Checklist

What operating system are you using?

Windows

Build Details

2.3.2.0-RC1 | Built on 2.3.2024, 02:00:40 | Sabiiro | 18cc5a2d67829e4d5e5bd3b479aa22d68e5a68bb

Operating System Version

Windows 11

Describe the Bug

If I shuffle songs from my title library the songs are not getting tracked by musickit sometimes. -> they are not shown in the played history -> musickit says that an older song was played last (other instance -> https://amp-api.music.apple.com/v1/me/recent/played/tracks?l=de-DE&platform=web) image

Steps to Reproduce

  1. right clock in library/title -> shuffle songs or directly in library/title image

Anything else?

No response

Connect Device ID

No response

Build timestamp

1709556383194

UnbreakCode commented 4 months ago

I noticed this after i had used cider for about 4 hours. The last hour nothing was tracked (as if the session was expired)

coredev-uk commented 5 days ago

This might be the result of us generating the queue over MusicKit, I'm not too sure what it directly does to cause music playback data to be saved. For both the sidebar option and the one at the top we get all the songs and randomly assign queue positions, over just using MusicKit's built-in shuffle functionality, which I imagine does some extra stuff. MusicKit shuffle does not handle large queues well this is why this is done.

I'm not too sure what we can really do outside allowing you to choose with an option.

coredev-uk commented 4 days ago

Looking at what calls get made when songs are changed and the list of recently played songs, the universal-activity-service.itunes.apple.com/play call is being made with varying payloads. Strangely enough calls to this API seem identical (aside from relevant song Ids) in both calls that add to the recently played and don't.

Cider does seem to be differing from AM web in this call, where they define a feature name as library / songs rather than song and include additional information on playback mode (shuffle, autoplay, repeat), however they still have the same information delivered outside those changes. They could be changes made for their MusicKit build for the site, I'm not too sure.

In any case, I have no idea how we will directly mutate this call since its originated from inside MusicKit, nor do I know if this will even fix it and if it is a server error on their end with the data we send, idk.

If you really want it all tracked, I suggest just clicking on one of the songs and enable shuffle as this seems to update as needed.

UnbreakCode commented 21 hours ago

thank you for your explanation on this topic. :)