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

Scrobbled tracks not saving #53

Open
sprtm opened this issue Nov 18, 2018 · 11 comments
Open

Scrobbled tracks not saving #53

sprtm opened this issue Nov 18, 2018 · 11 comments
Labels

Comments

@sprtm
Copy link

sprtm commented Nov 18, 2018

"Scrobbling now" updates correcty after each track change, but scrobbled tracks are never saved to the last.fm site.

(11:28:53) [INFO] Using Last.fm service URL
(11:28:53) [INFO] Connected to MPD.
(11:28:54) [INFO] Last.fm handshake successful. SessionID: TqyraLxkocHe57A6N1WvCR5ssT_w2mVN
(11:28:54) [INFO] New song: Charles Bronson - Debate Team Bake Sale
(11:28:55) [INFO] Updated "Now Playing" status successfully.
(11:28:56) [INFO] Scrobbling: Charles Bronson - Debate Team Bake Sale
(11:28:56) [INFO] Scrobbled successfully.

Using Raspbian 8.

@hrkfdn
Copy link
Owner

hrkfdn commented Nov 19, 2018

There is nothing in the logs indicating a problem, esp. on mpdas' side, as the server returned "ok" ("Scrobbled successfully").

If you want to dig further, you could log the responses sent by Last.fm, however, that would require some manual code edits, e.g. by logging the server's response after this call: https://github.com/hrkfdn/mpdas/blob/master/audioscrobbler.cpp#L177

Like such:
iprintf("%s", _response.c_str());

To be honest, though, I think this is a problem on Last.fm's side, as the server accepted our submission.

@sprtm
Copy link
Author

sprtm commented Nov 19, 2018

This is the response. Not so detailed, unfortunately. But it looks like the scrobble is ignored by the service.

(17:03:18) [INFO] New song: Neil Young - War of Man (17:03:19) [INFO] Updated "Now Playing" status successfully. (17:03:20) [INFO] Scrobbling: Neil Young - War of Man (17:03:20) [INFO] <?xml version="1.0" encoding="UTF-8"?> <lfm status="ok"> <scrobbles ignored="1" accepted="0"> <scrobble> <track corrected="0">War of Man</track> <artist corrected="0">Neil Young</artist> <album corrected="0">Harvest Moon</album> <albumArtist corrected="0"></albumArtist> <timestamp>1542646999</timestamp> <ignoredMessage code="1"></ignoredMessage> </scrobble> </scrobbles> </lfm>

@hrkfdn
Copy link
Owner

hrkfdn commented Nov 19, 2018

It was filtered by the service (code 1):

https://www.last.fm/api/scrobbling#filtered-requests

@sprtm
Copy link
Author

sprtm commented Nov 19, 2018

Very strange. This happens with every track. Same tracks scrobble fine with mpd-scrobbler.

@hrkfdn
Copy link
Owner

hrkfdn commented Nov 20, 2018

Huh, that is strange indeed. So it's probably submitting tracks differently. It would be interesting to see and compare what mpdas and mpd-scrobbler are submitting to Last.fm. Maybe a different albumArtist tag?

@sprtm
Copy link
Author

sprtm commented Nov 20, 2018

I discovered that it is when playing tracks over UPnP (Audirvana+ on a Mac) to mpd (Volumio on a RPi) that all scrobbles are returend with scrobbles ignored="1".

If I play the same tracks directly from Volumio, they'll scrobble correctly.

When playing over UPnP the tracks are scrobbled immediately when started (and therefore rejected by last.fm?), but when playing in Volumio they are scrobbled after half(?) of the track as intended. And accepted by last.fm.

Maybe track duration isn't working correctly over UPnP (but for some reason it's working in mpd-scrobbler).

@lukas12p
Copy link

lukas12p commented Feb 6, 2019

Hi,
Any solutions for this issue?
I have the same situation on Tidal > UPnP > Moode on RPi

@hrkfdn
Copy link
Owner

hrkfdn commented Feb 18, 2019

I would need more input to debug this as I don't run this configuration, e.g. captures of what is posted to Last.fm compared to Volumio's communication.

@helohe
Copy link

helohe commented Apr 28, 2020

I fixed this issue and added a pull request some time back. However the code I wrote is probably not the nicest. It fixes the UPNP issue however. IIRC: The problem was that mpd does not have all the required information immediately when starting to scrobble, so it has to be queried when available. Furthrmore the track length has to be queried in a different way, otherwise it is reported wrong and the scobbling fails.

@frantathefranta
Copy link

I'm trying to solve this with Audirvana and MoodeAudio. My scrobbling worked with Volumio but now it stopped. How do I proceed with your fix?

@helohe
Copy link

helohe commented Jul 13, 2020

@frantathefranta I think you can either checkout this version and then add my pull request or checkout the fork in my repository and compile that one.

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

No branches or pull requests

5 participants