Closed TheLastZombie closed 2 years ago
interesting, could you confirm that your user account has lastfm session?
$ sqlite3 path/to/gonic.db "select last_fm_session from users where name='admin'"
abc1234jdjdjdsdf
or whatever your username is
$ sqlite3 /var/lib/gonic/gonic.db "select last_fm_session from users where name='roesch'"
ql5XXXXXXXXXXXXXXXXXXXXXXXXXXLnG
the 200
response may be misleading. since I don't think the subsonic spec defines HTTP responses codes for subsonic errors. Since Ultrasonic isn't logging any errors while submitting - I just added some logging to the console.
Could you try go.senan.xyz/gonic/cmd/gonic@latest
(or however you are installing)
and check the logs again when scrobbling?
Thanks!
I re-ran the go install
command and tried again, but still no logs :/
I also manually sent one of the /scrobble HTTP requests (i. e. curl http://127.0.0.1:4747/rest/scrobble/[...]
) to see if I could get anything out of that, but that just gave me a simple:
<subsonic-response status="ok" version="1.15.0" xmlns="http://subsonic.org/restapi" type="gonic"></subsonic-response>
Oh, I might as well put my environment here, on the off chance it helps:
interesting
would you mind trying the go install again with @issue-162
at the end?
I just created that branch and it should log some more stuff including the raw response from lastfm
Ah, now I'm getting something:
2021/10/13 06:28:58 new scrobble request
2021/10/13 06:28:58 scrobbling with 0
2021/10/13 06:28:58 scrobbling with lastfm 17. Perfect Sound Whatever.mp3
2021/10/13 06:28:58 lastfm response:
2021/10/13 06:28:58 HTTP/2.0 200 OK
Content-Length: 451
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 86400
Alt-Svc: clear
Content-Type: text/xml; charset=UTF-8
Date: Wed, 13 Oct 2021 04:28:58 GMT
Server: openresty/1.13.6.2
Via: 1.1 google
<?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
<scrobbles ignored="1" accepted="0">
<scrobble>
<track corrected="0">Perfect Sound Whatever</track>
<artist corrected="0">Jeff Rosenstock</artist>
<album corrected="0">WORRY.</album>
<albumArtist corrected="0">Jeff Rosenstock</albumArtist>
<timestamp>2011765</timestamp>
<ignoredMessage code="1"></ignoredMessage>
</scrobble>
</scrobbles>
</lfm>
2021/10/13 06:28:58 scrobbling with 1
The ignoredMessage
sticks out to me. According to Last.fm's API documentation, a code of 1
means "filtered artist", but in the provided example, the field isn't empty (plus I've successfully scrobbled this artist before).
I also noticed the timestamps vary greatly (2011765 above, 1288728940 in the example). I wonder if it has something to do with that, but the ignoredMessage
code for "timestamp too far in the past" is 3
.
yeah that is a funny looking timestamp. what is the ?time=
param that ultrasonic sends to the /rest/scrobble
endpoint? if any
I also updated the issue-162 branch to improve the time parsing. maybe that could fix it?
There is no time
parameter, but:
I also updated the issue-162 branch to improve the time parsing. maybe that could fix it?
That did the trick! The timestamp looks normal now, and both the now playing statuses and scrobbles don't get rejected anymore.
Thanks for your quick response (and for Gonic in general) :)
I set up and linked Last.fm to my Gonic (0.14.0) instance, but scrobbling doesn't seem to be working.
I tested this with Ultrasonic, which updates the now playing status but doesn't send any scrobbles, and Subtracks, which does neither. I enabled the respective scrobble settings in both apps.
The log doesn't contain any errors either:
I also double-checked the API key/secret and my account connection. Curiously enough, Listenbrainz scrobbling does work.