Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_enhanced_playcount - Record all song plays and Last.fm scrobbles (Read 129385 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 #300
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.
I believe this should be fixed now in the new version. Try it out and let me know.

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

Reply #301
Yes, now it is not refreshes after 3 secs for the tracks that have no changes. But of course still does it when track plays to the moment when it updates playcount. I think this Search Window behavior is something, that better to report in the main foobar thread.

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

Reply #302
Yes, now it is not refreshes after 3 secs for the tracks that have no changes. But of course still does it when track plays to the moment when it updates playcount. I think this Search Window behavior is something, that better to report in the main foobar thread.
I couldn't actually replicate your behavior on 1.6. Search window didn't refresh for me when metadb updates were sent and selection/sorting didn't change at all. Still was a good issue you found, glad it's better at least.

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

Reply #303
I couldn't actually replicate your behavior on 1.6. Search window didn't refresh for me when metadb updates were sent and selection/sorting didn't change at all.
There are different search tools in Foobar. It happens only in Playlist Search window (Edit>Search). Library search does not have such a behavior. Also use 1.6 (Colums UI). Or maybe some specific settings inside Foobar triggers such a behavior.

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

Reply #304
I couldn't actually replicate your behavior on 1.6. Search window didn't refresh for me when metadb updates were sent and selection/sorting didn't change at all.
There are different search tools in Foobar. It happens only in Playlist Search window (Edit>Search). Library search does not have such a behavior. Also use 1.6 (Colums UI). Or maybe some specific settings inside Foobar triggers such a behavior.
You're right. I was using Library search. Seeing it now in playlist search. Definitely seems like a foobar issue, especially if it didn't happen before 1.6.

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

Reply #305
Any way to change play counter moment from 60s to 75% of the track?
In a classic playcounter I set 75% and now both statistics are different

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

Reply #306
Thank you for this plugin! It seems I can use that and forgo libre.fm scrobbling.

Using 4.3.1 with foo_playcount 3.0.4 and foo_scrobble 1.3.1 (if it matters), and it seems to give surprising numbers for scrobbles (fewer). I checked the API URL manually from the logs, and it gives the correct result.

Quote
Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=<some api key here>&user=ingver&artist=Amon Tobin&track=The Lighthouse&limit=200&format=json&page=1
Found 2 scrobbles in last.fm of "The Lighthouse"

I did try clearing scrobble data for that track and refetching from context menu. Same result.
Strangely the old last fm playcount sync by marc2003 had recorded the correct count. Maybe not as strict with album titles?

The URL in question returns 15, however (see spoiler):
Spoiler (click to show/hide)

Also, as an aside, at some point after first run it started fetching a bunch of scrobbles in quick succession (but still in sequence, not parallel) for lots of my artists, according to logs, until the API key got suspended. Reauthorizing got it working again, so hopefully not an issue. The results were saved to tracks so I guess it was lastfm being strict with rate limits.

Thanks again and sorry if it has been addressed before. Quick search did not yield anything for me.

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

Reply #307
I understand correctly that there are now two ways to send information about the music being played from foobar2000 to last.fm - using the Audioscrobbler by Florian Heidenreich and using the Enhanced Playback Statistics by MordredKLB? However, I did not find a way to enter my username and password from last.fm in this add-on. Neither the add-on page, nor the add-on help page, nor this thread.
Quote from: foobar2000: Components Repository - Enhanced Playback Statistics
To get the maximum use out of this component, JScript or WSH panel is also required.
I didn't find "JScript" and "WSH panel" in the foobar2000 Components Repository.

Help me please.

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

Reply #308
I didn't find "JScript" and "WSH panel" in the foobar2000 Components Repository.

Help me please.

It seems some of these components have been not updated for a while. I dug out my old fb2k installation and had to do quite a few changes.

It works for me with a newer https://github.com/gix/foo_scrobble, where you do not have to enter password, but simply oauth flow.

Instead of wsh panel maybe you can try the newer https://www.foobar2000.org/components/view/foo_spider_monkey_panel. I didn't try it myself (since I do not need to display anything except last.fm play count, for which no extra components are needed).
Note that it is not strictly necessary.

wsh panel mode is quite old (https://code.google.com/archive/p/foo-wsh-panel-mod/downloads), it was followed by https://github.com/kbuffington/foo_jscript_panel/releases but it seems a later version is at https://github.com/marc2k3/foo_jscript_panel/releases/tag/v2.4.3. The same author has helped with spider_monkey_panel, it seems.

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

Reply #309
Thank you for this plugin! It seems I can use that and forgo libre.fm scrobbling.

Using 4.3.1 with foo_playcount 3.0.4 and foo_scrobble 1.3.1 (if it matters), and it seems to give surprising numbers for scrobbles (fewer). I checked the API URL manually from the logs, and it gives the correct result.
....

Thanks again and sorry if it has been addressed before. Quick search did not yield anything for me.
So it looks like you're maybe playing a track from Splinter Cell soundtrack? There seem to be two scrobbles of that song from that album, while the rest are from a different album. Uncheck "Compare Album field when retrieving scrobbles" and then clear scobbles for that track and repull. At that point it should return 15.

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

Reply #310
I understand correctly that there are now two ways to send information about the music being played from foobar2000 to last.fm - using the Audioscrobbler by Florian Heidenreich and using the Enhanced Playback Statistics by MordredKLB? However, I did not find a way to enter my username and password from last.fm in this add-on. Neither the add-on page, nor the add-on help page, nor this thread.
Quote from: foobar2000: Components Repository - Enhanced Playback Statistics
To get the maximum use out of this component, JScript or WSH panel is also required.
I didn't find "JScript" and "WSH panel" in the foobar2000 Components Repository.

Help me please.
This addon does not scrobble tracks, it just retrieves scrobbles. As ingver recommended, use foo_scrobble.

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

Reply #311
Hey man thanks for your plugin can you give me a hand please ? I want to skip current track if i scrobbled it on my lastfm, So first step i installed your plugin and filled my username https://imgur.com/a/g78XTk9, Then installed Skip Track plugin and filled the query like %lastfm_play_count% MISSING, But nothing happens when i play something https://imgur.com/a/kjd8f49, Am i missing something ?

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

Reply #312
2 things:

-you need to fetch playcounts in advance of them being played for it to play nice with foo_skip. You'll need to select all tracks and use the right click menu option to do that.
-you want %lastfm_play_count% PRESENT if you want to skip tracks that you've already played.


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

Reply #313
@snotlicker It worked thanks!

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

Reply #314
2 things:

-you need to fetch playcounts in advance of them being played for it to play nice with foo_skip. You'll need to select all tracks and use the right click menu option to do that.
-you want %lastfm_play_count% PRESENT if you want to skip tracks that you've already played.
For the most problem free execution, especially immediately after installing the plugin, this answer is correct, but every 12 plays or so the the plugin will pull 1000 old scrobbles (moving backward from the current time), and every 5 tracks it retrieves the 500 most recent scrobbles so it will attempt to keep itself in sync with last.fm, but again you'll have needed to use the plugin for a little bit before it really works perfectly.

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

Reply #315
Hello,

I'm seeing this:
Code: [Select]
Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=error&artist=Tyler, the Creator&track=Bastard&limit=200&format=json&page=1
foo_enhanced_playcount: Exception making call to last.fm: Network error
Found 0 scrobbles in last.fm of "Bastard"
is this normal or not working?

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

Reply #316
Hello,

I'm seeing this:
Code: [Select]
Querying last.fm: http://ws.audioscrobbler.com/2.0/?method=user.getTrackScrobbles&api_key=a1685abe5265b93cf2be4a70d181bf6b&user=error&artist=Tyler, the Creator&track=Bastard&limit=200&format=json&page=1
foo_enhanced_playcount: Exception making call to last.fm: Network error
Found 0 scrobbles in last.fm of "Bastard"
is this normal or not working?
Not normal. I can load that URL, but it appears you haven't scrobbled that song before though (you still shouldn't get a network error). Are you able to load it in a browser? If that is still happening, or happening on every track possible something is blocking you from accessing last.fm.

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

Reply #317
v4.3.2 - fixes an issue where timestamps with a value of 0 could be saved if foo_playcount was not installed, and prevents time stamps of value 0 from ever being returned (they get returned too foobar as dates around the year 65000).

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

Reply #318
Great component, very useful, thank you for creating and maintaining it!

Some feedback:
When "compare album..." is enabled - component won't find and sync any scrobbles on files with no album tags, whyle last.fm has them. Disabling this option gives you correct number of scrobbles for this track.
Strange behavior - I'd expect component to drop check for files with no album tag present...
Also someone seemed to mention this issue on 2-3 page of the discussion, yet it I got it with foobar 1.6.4 and the latest component version.

Console info of requests:
Spoiler (click to show/hide)

Suggestion:
It would be nice to show how many scrobbles are currently recorded in the component database, so you can compare synced number to the overall last.fm record (smth akin to Total Time Played in Playback menu page)
I've got close to 450.000 scrobbles recorded on last.fm (16 years of data!) - so syncing would take awhile even with manual pulls  and it would be nice to have some estimation of my progress.



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

Reply #319
Also wanted to share a simple columns_ui code that gives user a simple "popularity bar" - easy to setup your own brackets based on  your preferences (my top tracks playcount goes quite high, users might want to adjust accordingly)

Spoiler (click to show/hide)

X

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

Reply #320
Great component, very useful, thank you for creating and maintaining it!

Some feedback:
When "compare album..." is enabled - component won't find and sync any scrobbles on files with no album tags, whyle last.fm has them. Disabling this option gives you correct number of scrobbles for this track.
Strange behavior - I'd expect component to drop check for files with no album tag present...
I'll take a look at that. You are right.


Quote
Suggestion:
It would be nice to show how many scrobbles are currently recorded in the component database, so you can compare synced number to the overall last.fm record (smth akin to Total Time Played in Playback menu page)
I've got close to 450.000 scrobbles recorded on last.fm (16 years of data!) - so syncing would take awhile even with manual pulls  and it would be nice to have some estimation of my progress.
That would be pretty cool, but there are 2 issues:
1) Let's say you have two copies of that Dream On track (maybe one's on a regular album and one is on a greatest hits). Depending on settings and how things are tagged in your library, both tracks could have records of the same 50 songs. Any count would double those values and so there's no way it could be accurate. Also, if you've scrobbled a song but it's not in your library (or can't be matched in your library because last.fm coerced the name or something) then scrobbles would be missing.

of course those are minor issues compared to:

2) there's no way to count how many scrobbles are recorded. It's not like a SQL database where I can just query how many rows exist. It would require retrieving every record in the database and then adding those values together.

That said you can go to the properties page and see the date it's next going to pull historical scrobbles from. Once that date ends up 16 years in the past you can be confident it's gotten most of them :)

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

Reply #321
Hi! Is it possible using this component to obtain a playlist or auto playlist, for the most played songs in a year, for example "Most played songs in 2020"? Congrats for your work with this component, foobar is great.

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

Reply #322
Hi! Is it possible using this component to obtain a playlist or auto playlist, for the most played songs in a year, for example "Most played songs in 2020"? Congrats for your work with this component, foobar is great.
Yes and no. You can create an auto-playlist with that query, but it will output duplicates as long as you have more than 1 version of the same track (statistics are saved for any track with same title - track number- artist - date). It will also output ALL tracks with play-count greater than 1. But they will be ordered and you have to cut the playlist to X tracks at any point later.

Autplaylist:
Code: [Select]
%last_played% DURING LAST 57 WEEKS AND %play_count% GREATER 1
Sort By:
Code: [Select]
 $sub(99999,%play_count%)

NOTE: you can not force the playlist to only output tracks played at 2020 since only %last_played% is saved (you would miss tracks played at 2021 too)! You can force %last_played% being at least 2020 or sooner, if that's ok.

NOTE 2: for the same reason, with queries, you can not really get most played tracks from 2020 (relative count). But only most played tracks (absolute count) that were also played at 2020. It's not the same! You can only do the 1st thing using js scripts.



If you want to create an autoplaylist without duplicates (and you can set what duplicates means according to any tag), then you can use a SpiderMonkeyPanel script. I do it with a button, using internally that query and then using another script to remove duplicates (by "title", "artist", "date"). Send me an email if you want the files.



There is also a bonus, you can also set the playlist length so it outputs only X top tracks. Using only an autoplaylist would recreate the entire list every time a track is played, so you would need to recreate and re-cut the playlist manually everytime with the first method.

Note anyway my script is an "absolute" Top tracks playlist, not relative to the year. But I could edit it easily if there is interest to use the variables from this plugin instead of queries:
Quote
%played_times% - Date formatted list: ["2012-08-04 15:58:37", "2012-12-10 14:40:46", "2018-01-02 23:38:13"]
%played_times_js% - JS timestamp list: [1344117517000, 1355172047000, 1514957893431]

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

Reply #323
Great post regor. One slight correction, documentation for foo_playcount is slightly wrong and the string it uses for computing hashes is:
%artist% - %date% - %album% $if2(%discnumber%,1)-%tracknumber% %title%
foo_playcount_enhanced uses:
%artist% - $year($if2(%date%,%original release date%)) - %album% $if2(%discnumber%,1)-%tracknumber% %title%

One other option you've got if you use Columns UI is to create filters like so:


Notice the $max(%play_count%,%lastfm_play_count%) if you play songs from outside foobar and retrieve scrobbles.

Then you can just select any song with over X number of plays to generate a playlist and then randomize it or whatever you want.

Edit: I'm just realizing that doesn't solve the ask which was most played songs IN a year, and not FROM a year :)

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

Reply #324
For a long time I used foobar and then eventually iTunes, and then for about a decade I rarely touched my music collection. Now I'm back to trying to sort everything out all nice and neat but I have a problem. I have play counts from foobar and from iTunes. I've tried combining them both in Musicbee but I don't see a way for that to happen. Can I add the iTunes play counts to my foobar play_counter using this plugin? If not, any other ideas?