sentriz / gonic

music streaming server / free-software subsonic server API implementation
ircs://irc.libera.chat/#gonic
GNU General Public License v3.0
1.5k stars 105 forks source link

Scrobbles not working #421

Closed fletchowns closed 7 months ago

fletchowns commented 7 months ago

gonic version: v0.16.2

if from source, git tag/branch: 5b5572d

I wasn't able to get scrobbling working, for either last.fm or listenbrainz. It sounded similar to #168

I've got both services linked in the settings: image

In my gonic log, I see the /scrobble endpoint is being hit:

2023/12/02 21:44:17 response  200  GET /scrobble?id=tr-17777&submission=false&v=1.15.0&f=json&c=https%3A%2F%2Fmusic.mydomain.net&u=fletchowns&s=KAp...&t=8f6...

However, I don't see any scrobbled being added to my last.fm or listenbrainz accounts. Is there a way to turn on debug logging of the HTTP requests it's sending to those services?

sentriz commented 7 months ago

hmmm looks like that is a submission=false scrobble, mean just "now playing" instead of a real scrobble

do you have any with submission=true?

also which client are you using?

fletchowns commented 7 months ago

Ahh, thanks! That gives me something to go on.

I am using airsonic-refix for my client, looks like this is where it handles the scrobbling: https://github.com/tamland/airsonic-refix/blob/bc4920fa57a20236ad7eef6f4483e50726b845c6/src/player/store.ts#L359-L384

From that, it looks like there should be another /scrobble call when you get to 70% of the track

Sure enough, shortly after that original log line I posted, I see the call with submission=true:

2023/12/02 21:44:17 response  200  GET /scrobble?id=tr-17777&submission=false&v=1.15.0&f=json&c=https%3A%2F%2Fmusic.mydomain.net&u=fletchowns&s=KAp...&t=8f6...
2023/12/02 21:46:44 response  200  GET /scrobble?id=tr-17777&submission=true&v=1.15.0&f=json&c=https%3A%2F%2Fmusic.mydomain.net&u=fletchowns&s=KAp...&t=8f6...
sentriz commented 7 months ago

interesting . I also use refix and it scrobbles great. maybe try unlink and link again in gonic?

fletchowns commented 7 months ago

Oh jeez - I just realized my mistake. The account linking to last.fm & listenbrainz is per-user. I had established the linking for my admin account, but not the gonic user account that I'm actually using from my player. I've logged into gonic with the user I'm actually using from refix, and linked last.fm & listenbrainz, and it's working now! Apologies for wasting your time 🤦

sentriz commented 7 months ago

glad you got it working 👍

I think I mention that idea of multi user scrobbling stuff in the UI . if you think the copy could be improved let me know

fletchowns commented 7 months ago

I do see the copy refers to that, and upon careful reading it makes sense:

scrobble to listenbrainz and compatible sites on a per user basis

I think what threw me off was the mix of contexts in the sections in the gonic ui.

sentriz commented 7 months ago

ah you're right they are quite mixed up like that. maybe ill add some split admin vs logged in user pages then. thanks!