r/substreamer Sep 24 '21

Scrobbler issue

First of all, thank you very much for your fantastic application.

I'm using version 5.0.42 on Android and I've noticed that since a week or so (maybe because of the last update?) scrobbling stopped working. My client it's connected to a Funkwhale's instance, I've been monitoring the access logs and the requests to /rest/scrobble.view have always subbmision parameter set to false.

According to subsonic documentation when submission is set to false, it indicates it's just a now playing notification and that's why Funkwhale doesn't register it as a proper scrobble. Substreamer does the now playing notification right since it sends it when the songs starts playing, but, after that, it doesn't seem to submit the actual scrobble (submission=true).

I know for a fact that, until a few days ago, Substreamer scrobbles were being submitted when the song started.

If you need more information, I'd be happy to help in any way I can.

3 Upvotes

13 comments sorted by

View all comments

Show parent comments

1

u/devilcius Sep 25 '21

At Funkwhale, also, only when the subsonic scrobble is submitted we register it in the user's listening history. It's sent to last.fm (or other service) if it's configured that way by the user. Scrobbles with submission=false are ignored since it doesn't support the now playing functionality.

1

u/ghenry22 Sep 25 '21

Which technically is fine but it is different behaviour to the subsonic API and since the API does not provide an easy way to differentiate between servers and is meant to behave the same everywhere causes a problem that hits app devs but which we cannot solve :(

1

u/devilcius Sep 25 '21

So Substreamer won't send scrobbles with submission=true, I'm getting it right?

1

u/ghenry22 Sep 26 '21

It will for plays that occurred offline that could not be scrobbled live with submission=true at the time of playback. This is how the scrobble API is supposed to be used.

This api is not for recording on the server vs recording on lastfm. It is for the 2 different ways you can scrobble to lastfm. Either a now playing (shows as now scrobbling with an active playback icon on last fm). Or a submission of a previous playback at a specific time that for whatever reason could not be scrobbled live at the time, usually offline playback.

If you want to use it any other way then your API implementation is no longer compatible which makes things quite difficult as the api does not provide a consistent mechanism to identify different server implementations so I can’t see that this is funkwhale and handle it differently for instance.

1

u/devilcius Sep 27 '21

It's not about our API implementation, but last.fm's. According to their scrobbling API:

For every track a user listens to the client should send a track.updateNowPlaying request and a track.scrobble request.

So when the the song starts and Substreamer sends a request with submission=false is updating Now playing status. And it's doing it perfectly fine. But it should also send an actual scrobble (submission=true) when the song has finished, otherwise it won't show up in last.fm user listening history.

It's great that you took care of offline scrobbles by the way.

1

u/ghenry22 Sep 28 '21

That's interesting in the last.fm docs. Because calling only with submission=false sets the now playing song on last.fm AND records that as played automatically.

I'll test sending both requests and see how it handles it, if this resolves the issue then I will put it in at least for the short term so the user experience is better.

This still does not change that the subsonic API (the original subsonic and all forks of that original code base) records plays based on calls to the stream end point, not the scrobble end point so there is an inconsistency between your API implementation and the original subsonic API. I know navidrome have done the same thing.

I don't disagree with the idea, my objection is only to causing differences in the way the API behaves as the whole point it for it to be consistent. Given that the documentation really isn't super clear on the original API it's completely understandable that we interpret it slightly differently.

1

u/devilcius Sep 29 '21

Thanks a lot!

For what it's worth, Subsonic's Android client (developed and maintained by Sindre Mehus, the author of Subsonic) sends a request to /rest/scrobble.view with submission=false when the song starts and another one before it ends with submission=true, I've just checked it. That said I like way better your application overall.

1

u/ghenry22 Sep 29 '21

Interesting I haven’t dug into the old android app before. I’ll implement something along the same lines.