Skip to content
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

Cannot scrobble to last.fm #37

Open
rosxz opened this issue Jan 21, 2022 · 8 comments
Open

Cannot scrobble to last.fm #37

rosxz opened this issue Jan 21, 2022 · 8 comments

Comments

@rosxz
Copy link

rosxz commented Jan 21, 2022

Hi, I've just recently installed mpdscribble and tried scrobbling to last.fm but to no avail.
Scrobbling to libre.fm works though, I tried enable forward scrobbles to last.fm there but it doesn't seem to work.
(EDIT: I've since realized that forwarding scrobbles to last.fm does indeed work, only the first 20 or so songs weren't forwarded)
My current ~/.mpdscribble/mpdscribble.conf is as follows:

log = /home/crea/.mpdscribble/mpdscribble.log
verbose = 1

[last.fm] 
url = http://ws.audioscrobbler.com/2.0/
username = notme
password = b25...9
journal = /home/crea/.mpdscribble/lastfm.journal

I also tried using url = http://post.audioscrobbler.com/ but it didnt change the result
log is as follows:

2022-01-21T14:54:36+0000 starting mpdscribble (mdc 0.24)
2022-01-21T14:54:36+0000 loaded 5 songs from /home/crea/.mpdscribble/lastfm.journal
2022-01-21T14:54:36+0000 connected to mpd 0.23.5 at localhost
2022-01-21T14:54:36+0000 new song detected (ASIAN KUNG-FU GENERATION - All right part2), id: 3, pos: 0

2022-01-21T14:54:38+0000 [last.fm] waiting 60 seconds before trying again

I double checked and the username/password are indeed correct as I am able to login to the last.fm website.

@MaxKellermann
Copy link
Member

Retry with verbose = 2 and url = http://post.audioscrobbler.com/, post the log. The "2.0" URL is wrong, because mpdscribble doesn't know the protocol version 2.

@zefer
Copy link

zefer commented Mar 23, 2022

I have the same problem, mpdscribble is not scrobbling to Last.fm. It was working up until recently and stopped when I upgraded from an old version to (I think 0.24) about 2 months ago (sorry for the lack of specific versions).

My mpdscribble.conf:

log = syslog

verbose = 1

[last.fm]
url = http://post.audioscrobbler.com/
username = ...
password = ...
journal = /var/cache/mpdscribble/lastfm.journal

Sample log output:

Mar 23 12:29:13 music systemd[1]: Starting AudioScrobbler for MPD...
Mar 23 12:29:13 music mpdscribble[4968]: starting mpdscribble (mdc 0.24)
Mar 23 12:29:13 music mpdscribble[4968]: loaded 408 songs from /var/cache/mpdscribble/lastfm.journal
Mar 23 12:29:13 music systemd[1]: Started AudioScrobbler for MPD.
Mar 23 12:29:13 music mpdscribble[4968]: connected to mpd 0.23.5 at /var/run/mpd/socket
Mar 23 12:29:14 music mpdscribble[4968]: [last.fm] waiting 60 seconds before trying again

I tried changing the config option verbose = 1 to verbose = 2 but it doesn't give me any additional log output. In fact I get less (the [last.fm] waiting 60 seconds before trying again stops appearing). Are there any other ways I can get more detailed logs or debugging information?

@owl4ce
Copy link

owl4ce commented May 15, 2022

Somehow using md5 hash password doesn't work.

@rosxz
Copy link
Author

rosxz commented Jun 2, 2022

Retry with verbose = 2 and url = http://post.audioscrobbler.com/, post the log. The "2.0" URL is wrong, because mpdscribble doesn't know the protocol version 2.

I forgot about this issue forgot quite a while, tried with the url on my laptop and it indeed works. Pretty sure I tried with that on the setup that was having problems and it didn't work, but i can no longer test it there and for all I know it is working to me now.
I have hashed md5 password, here's the logs with verbose 2 anyway:

2022-06-02T23:09:47+0100 starting mpdscribble (mdc 0.24)
2022-06-02T23:09:47+0100 loaded 0 songs from /home/crea/.config/mpdscribble/lastfm.journal
2022-06-02T23:09:47+0100 connected to mpd 0.23.5 at localhost
2022-06-02T23:09:48+0100 [last.fm] handshake successful
2022-06-02T23:09:48+0100 [last.fm] session: 962...e2
2022-06-02T23:09:48+0100 [last.fm] now playing url: http://post.audioscrobbler.com:80/np_1.2
2022-06-02T23:09:48+0100 [last.fm] submit url: http://post2.audioscrobbler.com:80/protocol_1.2
2022-06-02T23:10:40+0100 new song detected (Fishmans - Oh Slime), id: 1, pos: 0

2022-06-02T23:10:41+0100 [last.fm] sending 'now playing' notification
2022-06-02T23:10:41+0100 [last.fm] OK

Thanks (Not sure whether i should close the issue in case anyone still has the problem even with said url)

@jonathannerat
Copy link

I came across an issue with this as well.

In my case, the logs weren't helping and only setting verbose = 0 helped (even though it's supposed to only log critical errors). Turns out I was receiving a handshake error from last.fm (BADTIME). I got this fixed by setting up an NTP daemon to synchronize with internet time servers (maybe overkill, might be fixable by just changing your local time, but I didn't want to deal with this again). I installed OpenNTPD and after starting the service, the problem was fixed.

@zefer
Copy link

zefer commented Jun 20, 2022

Thanks @jonathannerat, it turns out I had the same problem. Using verbose = 0 I was able to see BADTIME errors in the logs, syncing new songs is fixed by fixing the system time.

New syncs are now working but I have a 48KB /var/cache/mpdscribble/lastfm.journal file of unscrobbled songs from the past few months that don't seem to be syncing. The logs suggest they are POSTing, but no sign of them on Last.fm, I'll report back if I find a way to sync them...

Jun 20 13:56:13 music mpdscribble[1070]: [last.fm] submitting 10 songs
Jun 20 13:56:13 music mpdscribble[1070]: [last.fm] post data: [REMOVED]
Jun 20 13:56:13 music mpdscribble[1070]: [last.fm] url: http://post2.audioscrobbler.com:80/protocol_1.2
Jun 20 13:56:13 music mpdscribble[1070]: [last.fm] OK

@s6fty
Copy link

s6fty commented Nov 24, 2022

i edited my config files accordingly but the service had issues so i manually edited the service file with sudo systemctl edit --full mpdscribble.service i tried all the other things people said in the comments but i was no use, i was able to scrobble with mpdscribble -D --conf [config file] but the service didnt let me start it.

[Service]
Type=notify
ExecStart=/usr/local/bin/mpdscribble --no-daemon
User=[my username]

@jonathannerat
Copy link

User=[my username]

If you're trying to run the service for your user, you can just use the user service provided by this package, just run systemctl --user start mpdscribble

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants