-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: No scrobbling when using Spotify connect #51
Comments
Do you have evidence recently-played explicitly excludes tracks played via spotify connect? Or have you seen this occur over a prolonged period?
Additionally, sometimes spotify doesn't updated recently-played for a long time. I've seen it stay stale for several hours at a time. To verify:
after recently played is updated with the song from the normal player let me know if the spotify connect track does not show in recently played. |
I first noticed this behavior a few weeks ago, and since then the Spotify connect songs were always left out. I just went through the steps, and yes exactly. The Spotify player song are displayed there and the Spotify connect are not. |
Ok, thanks for verifying. I looked into it but don't have any good news for you...
I will need to implement the existing MemorySource used for subsonic to keep track of what is currently played and also modify its behavior a bit since recently-played also returns tracks. Unfortunately I do not have much time to work on MS at the moment...earliest I'd be able to get to this is late next week or second week of Oct. |
hej, in the meantime I found out that it is not a bug of Spotify Connect, but of the implementation that uses the application that I use. I use HiFiBerryOS and this uses librespot at the end. Here is the issue about it and as it seems, this will not be fixed in a timely manner either. You said that you can implement this using the existing MemorySource. Is this a lot of work? |
Thanks that was enlightening. So it seems that spotify requires the client to report that a track has been played rather than the server (spotify) keeping track of it. And that track reporting is part of their private API. So really any client using spotify connect (since its 3rd party by nature) will not have tracks played by that client reported to recently-played.
It will require refactoring either the existing Spotify implementation or MemorySource code to work as a hybrid. They are somewhat mutually exclusive right now as their "source of truth" for recently played tracks comes from totally different places. |
Re-reading the librespot discussion it seems like "currently-playing" and "recently-played" should be intrinsically linked: if a player is reporting what is being played than it would automatically be recorded to "recently-played" by spotify (so they are not two independent actions by the client). Since librespot is reversed engineered it has no contract to report played tracks -- the music you listened to is only downloaded by the client in order to play and spotify distinguishes between track downloaded vs. track played.
EDIT: Scratch that. I see spotifyd is acting as a Sink/device/speaker (and is wholly different than Spot/librespot). I can see currently-played and as a device from spotify's api. Investigating recently played now... |
* Use recently-played to scrobble backlogged tracks * Use currently-playing or current-state to implement spotify as a memory source in order to track plays made from spotify connect devices
I've got some changes in that should work for your scenario! Please try MS using either the git branch You should re-authenticate your spotify source after the first run to get new credentials with more permissions. |
Added in v0.4.2 and available in
|
Sry for the late answer. I was on the trip, but in the meantime I updated the container. Since then there were two error messages and the scrolling stopped.
In the meantime, I have tinkered my own solution. But it works only between HifiBerry and Maloja and this is my first Python project, as a noob, this was surprising not so difficult. But thanks for implementing the feature here. |
I have not been able to reproduce your error. It looks like a regular service issue upstream from spotify rather than an issue with MS. Also, the first line looks like spotify was working due to scrobbling the linkin park track?
Does this mean it was working fine (was tracking music and scrobbling to maloja) but then stopped at some point? That would mean it was just spotify's api being unavailable. EDIT: Please make sure you are on the latest |
Due to a seeming bug at Spotify, it is (currently?) not possible to get songs via the
recently-played
api endpoint, which were played via Spotify connect. The endpointcurrently-playing
shows the correct song though.Is there a way to include this as a fallback?
Greetings
The text was updated successfully, but these errors were encountered: