Skip to main content
Topic: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (Read 40713 times) previous topic - next topic
0 Members and 1 Guest 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.


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

Reply #285
Hello. Great Plugin, but I have encountered frequent issue where it returns zero scrobbles from LastFM for specific tracks. About 5% of my tracks show zero values. I tried to disable "Compare album field" option, but it didn't helped.
LastFM shows the scobbles of those tracks correctly (both site and LastFM plugin)

Here is the example:

Arist: Big Blood
Album: Operate Spaceship Earth Properly
Title: No Human Color

Code: [Select]
Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=The-Axolotl&artist=Big Blood&track=No Human Color&limit=200&format=json&page=1
Found 0 scrobbles in last.fm of "No Human Color"

Here's the link to this track LastFM page (for my profile) where you can see that there's more than 30 scroblles of it in my profile.
https://www.last.fm/user/the-axolotl/library/music/Big%20Blood/_/No%20Human%20Color
First i thought that this is some LastFM autocorrecting issue, but as you can see the name in tags matches the name in LastFM database.

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

Reply #286
Update: mentioned ubove problem comes out to happen only on my old system with Foobar 1.3.2. Today tried on latest Foobar and all works fine. But, maybe it still will be useful in some way.

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

Reply #287
Update: mentioned ubove problem comes out to happen only on my old system with Foobar 1.3.2. Today tried on latest Foobar and all works fine. But, maybe it still will be useful in some way.
That's weird. Are you positive you were using the most recently released version?

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

Reply #288
Version of plugin in both cases were 4.2.1.
Other foobar components and foobar configs in both cases were the same.
Foobar 1.3.2>1.5.2


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

Reply #289
Has anyone pointed that the plugin shows a bit incorrect dates of the first and last playback?

3 left columns are marc2003's "last.fm playcount sync" plugin, 3 right columns are "enhanced playcount". the lfps dates are exact as the ones on last.fm, while enh-playcount dates has 1 increased minute

and also comparing to lfps, enh-playcount for some reason don't sync tracks below 0:30 by default, while lfps does (it was already discussed here, but i've searched through the thread and didn't find anything about the fixes):



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

Reply #290
Strictly speaking, you shouldn't have any plays recorded for tracks shorter than 30 seconds. It's one of last.fm's rules. Submitting the length is always a required field for any scrobbler and last.fm will reject anything shorter than 30 seconds. I'm sure all scrobblers for fb2k obey the rules so the only way you can have plays existing on last.fm is by using some other scrobbler that fakes the length.

As for Last.fm playcount sync fetching these plays, it's simply a bug. It doesn't fetch them when listening normally because it does check the length... but when doing any kind of manual lookup of selected items via the context menu, the length of each item is not checked.

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

Reply #291
But shouldn't the plugin just adopt existing last.fm data? if i already have that track scrobbled - then i should get play counts back for any mp3 with the same artist+title tags, isn't it? i mean what if i've scrobbled 0:31 version on youtube, while my mp3 is 0:29? or if i have few different rips with +- few seconds? The rule of ignoring tracks below 0:30 is not really fine thing for syncing existing data, in my opinion.

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

Reply #292
3 left columns are marc2003's "last.fm playcount sync" plugin, 3 right columns are "enhanced playcount". the lfps dates are exact as the ones on last.fm, while enh-playcount dates has 1 increased minute
Marc's already answered your question regarding songs shorter than 30s, so I'll explain this one.

This component was meant to work in concert with foo_playcount. foo_playcount records a song as played when you play one minute of it. The last.fm scrobblers for foobar record the time the song started playing. Because I wanted those values to match up inside the values stored in foo_enhanced_playcount, I add 60 seconds to the scrobbled time retrieved from last.fm.

For songs between 30 and 59 seconds, the value would be off, as it would be if you paused a track at 0:59 for an hour, and then unpaused it and let it play through.

However 99% of the time the values should match up, and fudging the response by 60s doesn't seem like it would hurt much.

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

Reply #293
First, thanks for all the work.

May I ask why the plugin wasn't created to request a login token? I mean, I don't know the technicality about any of this but I'm asking because I don't like to have my profile open to everyone which this plugin apparently needs.


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

Reply #294
Check reply 189 - 191 in this thread.

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

Reply #295
First, thanks for all the work.

May I ask why the plugin wasn't created to request a login token? I mean, I don't know the technicality about any of this but I'm asking because I don't like to have my profile open to everyone which this plugin apparently needs.
Cause I'm a shitty dev and never even thought about it (and would have to research a ton to figure out how to do it). I can look at that again someday when I finish some of the other projects I'm working on though.

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

Reply #296
Hello, plugin works pretty fine, but has one annoying issue.
When you try to use Playlist Search and select and listen tracks from this search window, after a few seconds plugin refreshes this window so it loses focus on which track you were. More than that, when you sort tracks in Playslist Search window, after refreshing it sorts it back to initial state.

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

Reply #297
Hello, plugin works pretty fine, but has one annoying issue.
When you try to use Playlist Search and select and listen tracks from this search window, after a few seconds plugin refreshes this window so it loses focus on which track you were. More than that, when you sort tracks in Playslist Search window, after refreshing it sorts it back to initial state.
Not much I can do about that. It's not the plugin, it's that 3 seconds after song starts the plugin queries last.fm and gets updated scrobble information for the currently playing song. That triggers an on_metadb_changed callback for a track that's visible in the plugin window, and the playlist search is refreshing because it has no idea what data actually change. For all it knows it was the song name that changed and so it has to update its contents.

About the only thing that could be done would be disabling automatic pulling of scrobbles, but then what's even the point of having this component if the information is never up to date?

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

Reply #298
Actually the window refreshes after 3 seconds even if the scrobble info for this track remains the same. Maybe if plugin will update scrobble information only if something has changed, than it wil at least romove a big part of a problem.

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

Reply #299
Actually the window refreshes after 3 seconds even if the scrobble info for this track remains the same. Maybe if plugin will update scrobble information only if something has changed, than it wil at least romove a big part of a problem.
Hmmm... looks like you might be right. Looking at the code it seems I'm setting the metadb record even if the values returned from lastfm contain no new information. I'll verify that and create a fix to mitigate that extraneous callback notification.

 
SimplePortal 1.0.0 RC1 © 2008-2020