arkq / cmusfm

Last.fm standalone scrobbler for the cmus music player
GNU General Public License v3.0
232 stars 5 forks source link

Last.fm scrobbling does not work and cmufm does not report any errors #18

Closed gregkwaste closed 6 years ago

gregkwaste commented 6 years ago

I'm using cmus 2.8.0-rc0 and I just re-installed cmusfm which was working fine in the past (haven't used cmus for a couple of months).

I used the cmus.debug wrapper script that is included in the repo for debugging but it doesn't report anything weird at all. However scrobbles are not submitted to last fm. I've also re-initialized cmusfm to update the app authorization.

Here is the output of the /tmp/cmusfm.debug file

1520860738
--- status playing file /media/SAMSUNG/Music/Death/(1998) Death - The Sound Of Perseverance/01 - Scavenger Of Human Sorrow.mp3 artist Death album The Sound of Perseverance discnumber 1 tracknumber 1 title Scavenger of Human Sorrow date 1998 musicbrainz_trackid c9b544ba-288b-48b3-af8b-77c6d977c440 duration 415
---
1520861153
--- status playing file /media/SAMSUNG/Music/Death/(1998) Death - The Sound Of Perseverance/02 - Bite The Pain.mp3 artist Death album The Sound of Perseverance discnumber 1 tracknumber 2 title Bite the Pain date 1998 musicbrainz_trackid 8559d2aa-856f-4791-b0e5-d13e47343805 duration 269
---
1520861335
--- status playing file /media/SAMSUNG/Music/Death/(1998) Death - The Sound Of Perseverance/03 - Spirit Crusher.mp3 artist Death album The Sound of Perseverance discnumber 1 tracknumber 3 title Spirit Crusher date 1998 musicbrainz_trackid 61271d23-b542-4517-9bb2-4b4a0d35d28b duration 405
---
1520863267
--- status playing file /media/SAMSUNG/Music/Death/(1998) Death - The Sound Of Perseverance/01 - Scavenger Of Human Sorrow.mp3 artist Death album The Sound of Perseverance discnumber 1 tracknumber 1 title Scavenger of Human Sorrow date 1998 musicbrainz_trackid c9b544ba-288b-48b3-af8b-77c6d977c440 duration 415
---

I'll try to re-build cmusfm with the DEBUG flag on just to see if it is going to print any useful information to trace what is happening

gregkwaste commented 6 years ago

Just tested the --enable-debug version

1520864326
--- status playing file /media/SAMSUNG/Music/Death/(1998) Death - The Sound Of Perseverance/03 - Spirit Crusher.mp3 artist Death album The Sound of Perseverance discnumber 1 tracknumber 3 title Spirit Crusher date 1998 musicbrainz_trackid 61271d23-b542-4517-9bb2-4b4a0d35d28b duration 405
DEBUG ../../src/main.c:67: Cmus argv: status playing
DEBUG ../../src/main.c:67: Cmus argv: file /media/SAMSUNG/Music/Death/(1998) Death - The Sound Of Perseverance/03 - Spirit Crusher.mp3
DEBUG ../../src/main.c:67: Cmus argv: artist Death
DEBUG ../../src/main.c:67: Cmus argv: album The Sound of Perseverance
DEBUG ../../src/main.c:67: Cmus argv: discnumber 1
DEBUG ../../src/main.c:67: Cmus argv: tracknumber 3
DEBUG ../../src/main.c:67: Cmus argv: title Spirit Crusher
DEBUG ../../src/main.c:67: Cmus argv: date 1998
DEBUG ../../src/main.c:67: Cmus argv: musicbrainz_trackid 61271d23-b542-4517-9bb2-4b4a0d35d28b
DEBUG ../../src/main.c:67: Cmus argv: duration 405
DEBUG ../../src/server.c:402: Sending track to server
DEBUG ../../src/server.c:488: Record length: 191
---

Everything looks normal but scrobbles are not shown in last.fm :/

arkq commented 6 years ago

Hi, it seems, that you've got running instance of cmusfm (cmusfm server) which was not invoked via cmusfm.debug. Before gathering logs, please kill every instance of cmusfm, e.g. pkill cmusfm.

Please, try to get logs from cmusfm server. You can run it as a foreground process like this: cmusfm server (be sure, that there was no running server before this command).

As for scrobbling it is really strange, because I was able to scrobble today, so it seems it is not a last.fm issue.

gregkwaste commented 6 years ago

Killing the running instance of the server did the trick. Scrobbles work like a charm now thank you very much :) I didn't notice that there was a server process to be honest, I thought cmusfm just submit the song to the api directly. I'll pay attention to the background processes from now on. Thank you again :)

arkq commented 6 years ago

OK, I'm glad, that everything works fine now :) The server process is required for tracking playback state. Track is not scrobbled right away, there are some "rules" (provided by last.fm) when track can be scrobbled.

I'm closing this issue, then.