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

Last.fm scrobbles are not retrieved correctly #11

Open
quickparser opened this issue Jun 8, 2023 · 2 comments
Open

Last.fm scrobbles are not retrieved correctly #11

quickparser opened this issue Jun 8, 2023 · 2 comments

Comments

@quickparser
Copy link

quickparser commented Jun 8, 2023

I noticed in the foobar2000 console that the number of scrobbles retrieved from last.fm for all the songs is 0, even thought the scrobbles are there.

For example from the console:

Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=q-parser&artist=Blush&track=In %26 Out (Rocco Remix)&limit=200&format=json&page=1
Found 0 scrobbles in last.fm of "In & Out (Rocco Remix)"

My curl attempt using the URL from the console:

$ curl -s --raw "http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=q-parser&artist=Blush&track=In %26 Out (Rocco Remix)&limit=200&format=json&page=1" | jq '.trackscrobbles.track | length'
parse error: Invalid numeric literal at line 3, column 0
$

My curl attempt without jq parsing:

$ curl -s --raw "http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=q-parser&artist=Blush&track=In %26 Out (Rocco Remix)&limit=200&format=json&page=1"

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>400 Bad Request</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Bad Request</h1>
<h2>Your client has issued a malformed or illegal request.</h2>
<h2></h2>
</body></html>
$

My 2nd curl attempt replacing the whitespaces with %20 in the URL:

$ curl -s --raw "http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=q-parser&artist=Blush&track=In%20%26%20Out%20(Rocco%20Remix)&limit=200&format=json&page=1" | jq '.trackscrobbles.track | length'
74
$
@kbuffington
Copy link
Owner

I did some tests and curl from the console is not identical to the HTTP requests made from the component. Are you still having issues or is it just related to this one track?

@quickparser
Copy link
Author

quickparser commented Mar 4, 2024

Yes, I still am. I was trying to look for a pattern in the tracks' names, but did not find anything. I did a test with a few more tracks that return 0 scrobbles, though I actually have a non-zero count value for them. Not all track names containing white spaces do that. Strangely, even some tracks with single word artist name and single word track name do that as well.

I've attached the output from the foobar console log - Tracks & Log.txt

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

2 participants