Skip to main content
Topic: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (Read 33902 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #275
Thanks for this useful component. It works well outside one issue.

I can't get any last.fm scrobbles for tracks that contain certain punctuation characters in their title or album field:
Code: [Select]
(
)
,

This is the error message that shows up in the console:

Code: [Select]
foo_enhanced_playcount: Exception making call to last.fm. Returning empty response.

I see that punctuation is mentioned in the change log, so I'm not sure if this just some problem on my end or not.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #276
Thanks for this useful component. It works well outside one issue.

I can't get any last.fm scrobbles for tracks that contain certain punctuation characters in their title or album field:
Code: [Select]
(
)
,

This is the error message that shows up in the console:

Code: [Select]
foo_enhanced_playcount: Exception making call to last.fm. Returning empty response.

I see that punctuation is mentioned in the change log, so I'm not sure if this just some problem on my end or not.
That's weird. I haven't seen any issues like this. Can you post the entire URL of the call that is being made to last.fm?

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #277
That's weird. I haven't seen any issues like this. Can you post the entire URL of the call that is being made to last.fm?

My bad, the problem is definitely on my end. I use foobar2000 under Wine and can't get any scrobbles now. I used a Windows VM before that which worked fine.

Do you happen to have an idea what could be needed to make it work? I have already tried installing .NET framework 2.0/3.0 but that didn't help.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #278
My bad, the problem is definitely on my end. I use foobar2000 under Wine and can't get any scrobbles now. I used a Windows VM before that which worked fine.

Do you happen to have an idea what could be needed to make it work? I have already tried installing .NET framework 2.0/3.0 but that didn't help.
Unfortunately I don't. I run my foobar inside VMware Fusion on my OSX box.

This is my code that makes the call:
Code: [Select]
		try {
response = request->run_ex(url, callback);
response->read_string_raw(buf, callback);
} catch (...) {
FB2K_console_formatter() << COMPONENT_NAME": Exception making call to last.fm. Returning empty response.";
buf = "{}";
cacheable = false;
}

It seems likely that request->run_ex is not able to work correctly in your current configuration. Might be worth googling for run_ex (it's a fb2k API) and WINE on this forum.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #279
Do you happen to have an idea what could be needed to make it work? I have already tried installing .NET framework 2.0/3.0 but that didn't help.
Here's a version with improved error logging. Let me know what that tells you. Thanks to marc2k3 for the code suggestion!

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #280
Hi! Thanks fo the wonderful plugin, MordredKLB!

I've got a problem with some songs, they are nor scrobbled at all, I suppose it's because of the ' character in the artist name. For example:

Code: [Select]
Opening track for playback: "E:\MP3\The Blues Collection\41 - Memphis Jug Bands - Walk Right In\01 - Bring It With You When You Come.mp3"
Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=nasssoo&artist=Cannon's Jug Stompers&track=Bring It With You When You Come&limit=200&format=json&page=1
Found 0 scrobbles in last.fm of "Bring It With You When You Come"

I hope you coud help me with thiis!

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #281
You're in the wrong topic. This component doesn't scrobble. It "retrieves" scrobbles back from last.fm, it doesn't send them.

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #282
You're in the wrong topic. This component doesn't scrobble. It "retrieves" scrobbles back from last.fm, it doesn't send them.

Yeah, you're right about that :) But there's something wrong with the playcount too - I've managed to scrobble it with google music, and now I've got this:

Code: [Select]
Opening track for playback: "E:\MP3\The Blues Collection\41 - Memphis Jug Bands - Walk Right In\01 - Bring It With You When You Come.mp3"
Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=nasssoo&artist=Cannon's Jug Stompers&track=Bring It With You When You Come&limit=200&format=json&page=1
Found 0 scrobbles in last.fm (since last known scrobble at 2020-02-09 01:06:24) of "Bring It With You When You Come"
ListenBrainz 2: {"status":"ok"}
Lastfm Playcount: Attempt: 2
Lastfm Playcount: Attempt: 3
Lastfm Playcount: Attempt: 4
Lastfm Playcount: Attempt: 5
Lastfm Playcount: Attempt: 6
Lastfm Playcount: Attempt: 7
Lastfm Playcount: Attempt: 8
Lastfm Playcount: Attempt: 9
Lastfm Playcount: Attempt: 10
Lastfm Playcount: Database error. Playcount not updated.
foo_scrobble: Submitting track

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #283
Yeah, you're right about that :) But there's something wrong with the playcount too - I've managed to scrobble it with google music, and now I've got this:

Code: [Select]
Opening track for playback: "E:\MP3\The Blues Collection\41 - Memphis Jug Bands - Walk Right In\01 - Bring It With You When You Come.mp3"
Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=nasssoo&artist=Cannon's Jug Stompers&track=Bring It With You When You Come&limit=200&format=json&page=1
Found 0 scrobbles in last.fm (since last known scrobble at 2020-02-09 01:06:24) of "Bring It With You When You Come"
It's working correctly. You've scrobbled the song once, and the component knows about it. When you start playing the song again, it checks the scrobbles and only retrieves new ones. You can see it says: Found 0 scrobbles in last.fm (since last known scrobble at 2020-02-09 01:06:24). Once you play a song it isn't scrobbled until the song is over so the component won't know about it until it checks recent scrobbles (every 5 tracks played), you play the song again, or it get's caught when it checks historical scrobbles (every 12 tracks played - but works backward from the oldest scrobble it knows about).

 

Re: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles

Reply #284
I had a request to add a new feature to the component, where the user wanted to get when any song by an artist was last played, particularly for use with foo_skip. This seemed like a reasonable request, so I went ahead and did it.

I added a new property: %artist_last_played% which can be used to retrieve this timestamp. This does necessitate another metadb file (0C1BD000-43E7-4078-B885-48EE4249DED0), but it'll be super tiny. Play around with it and let me know if there are any issues. Consider this an RC even though it isn't tagged as one.


 
SimplePortal 1.0.0 RC1 © 2008-2020