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 129368 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 (JScript)

Reply #125
A user says to the dev he doesn't "understand' about his own work. Now that's funny.

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

Reply #126
You don't seem to understand. You need to test yourself and you'll know. Thank you.
I've done over a hundred hours of development and testing and mucking about with the weirdness that is last.fm's stored data. I also spent 30 minutes yesterday looking at what you posted and the last.fm responses. I'd say I have a fairly good idea of what's happening. Without your actual files that you can't retrieve scrobbles for, I can't say more.

Regarding foobar freezing, can you please tell me how many files you were trying to pull last.fm data for at the same time? Was it 100? 1000? 10k? I can't test that without more information on your end.

A user says to the dev he doesn't "understand' about his own work. Now that's funny.
I'm being incredibly nice because that hang worries me.

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

Reply #127
Just released v3.0.2

Changelog
  • Relaxed last.fm string matching. Before "Test: This", "Test - This", "Test/This" all would be seen as different, now they'd all be considered matches.
  • The component still ignores all punctuation other than &,(, and ), but if the song title only contains spaces and punctuation, then an exact match is done. This fixed a problem I had with an album which only contained songs with a punctuation for song titles.
  • If retrieving last.fm scrobbles is unchecked in the config, or the username has not been set, the right-click option to retrieve scrobbles is disabled.

I also tested the component by retrieving scobbles for 5k different songs (encompassing 500 different artists) and could not replicate any crash. Seems pretty damn solid to me. Unless there's a bug or extra functionality that someone wants, this might be the last release for a while.

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

Reply #128
Thanks for the update.

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

Reply #129
Hi, I love the component. It's very important to me so I'd like to say thanks for all the work you put into it.

I have a question: where is the playback data stored? I know I can retrieve it like a tag, but doesn't seem to be stored like a tag or a file property. I would like to know how to back up this data so I don't lose it. Thanks again for all the work you did on the component.

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

Reply #130
I think MordredKLB already mentioned it in this thread. It's stored in Index-data folder, file name 0C1BD000-43E7-4078-B885-48EE4249DEC3.

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

Reply #131
I think MordredKLB already mentioned it in this thread. It's stored in Index-data folder, file name 0C1BD000-43E7-4078-B885-48EE4249DEC3.
That's it! I recommend using foo_jesus to backup the entire index-folder.

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

Reply #132
Edit: Doh. Just moved the data as referenced in the posts above and it works now.

Hello. I've noticed that this plug-in appears to have broken for me.

When I first installed it many months ago I setup a playlist column to display %lastfm_play_count% which worked fine; however, now all of my tracks simply show 0. Clearing the cache or trying to force a new last.fm query doesn't resolve this.

I'm using Foobar 1.4 with version 3.0.2 of the plugin. My lastfm username is still present and the plugin is set to retrieve scrobbles etc.

Any advice with regards to troubleshooting? Many thanks for your time and and efforts in creating this software.

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

Reply #133
Edit: Doh. Just moved the data as referenced in the posts above and it works now.
Glad it's working for you again, but I'm not sure what you mean by this line. Did you manually move the db file from index-data?

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

Reply #134
Edit: Doh. Just moved the data as referenced in the posts above and it works now.
Glad it's working for you again, but I'm not sure what you mean by this line. Did you manually move the db file from index-data?

Yes, sorry. I moved the file and it regenerated in a working state. I didn't delete in case it made no difference, in which case I would have put it back.

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

Reply #135
Gotcha. Sounds like it got corrupted due to a partial write or crash or something.

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

Reply #136
Released v3.0.3

Changelog
  • Fixed a bug where if last.fm scrobbling is disabled, or a track has been played but no scrobbles were found for it in last.fm, then foobar's individual plays were not being saved.

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

Reply #137
v3.0.4 fixes the previous problem in a slightly smarter way.

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

Reply #138
Please, show an example of a working script for JScript. I copy the text from the first post, but only the white window as a result.

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

Reply #139
Please, show an example of a working script for JScript. I copy the text from the first post, but only the white window as a result.
It doesn't require JScript, but to do fancier things (like listing out all played dates) requires JScript. The code in the first just shows how you can iterate over the array of values returned by the component, but doesn't actually display them or do anything fancy -- that'd be up to the you or the theme you're using. You can just use the fields provided in the first post without JScript if you want.

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

Reply #140
like listing out all played dates requires JScript.
Yes, this I would like to implement.

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

Reply #141
Please, show an example of a working script for JScript. I copy the text from the first post, but only the white window as a result.
Exactly my question/problem/situation, why I came here in the second place :-)

But first things first:

Hello,
thanks a lot for this interesting component. Reading the Wiki and this 6 pages short thread, I've learned a lot (not only useful for this component) and it seems that this component could be of good statistical use, which I -from time to time- like to view.

Now the nagging :-)

I have installed JScript/JSPanel (running some nice little scripts which are working good), but I have no idea/knowledge of how to set up a nice lookin panel to view the information provided by this component.

So whats now?
I'd love to see someone (else than me) who is eager to enhance the Wiki with a Startup-Guide, á la:
Ok, now you have it installed, but what can you do with it?
Give us some screenshots with example-code and a nice litte description how to implement it in DUI/CUI. How ppl. using it, etc.

Otherwise I'm lost. (The white window effect" DVS talked about.)

You (or someone else) wrote in the wiki "More code samples in the official thread." but I did not found anything.

So, can anybody reading/writing here, give us their settings/jscode/screenshots, so nobrainers like me can just copy/paste and learn ? That would be great.

EDIT:
Ah, I forgot:
from the console
Code: [Select]
[22:04:50]  hasNonPunctChars = false 
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50]  hasNonPunctChars = false
[22:04:50] Found 0 plays in last.fm (since last recorded scrobble) of Mod East
Why so many "hasNonPunctChars" entries?

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

Reply #142
I have installed JScript/JSPanel (running some nice little scripts which are working good), but I have no idea/knowledge of how to set up a nice lookin panel to view the information provided by this component.

So whats now?
I'd love to see someone (else than me) who is eager to enhance the Wiki with a Startup-Guide, á la:
Ok, now you have it installed, but what can you do with it?
Give us some screenshots with example-code and a nice litte description how to implement it in DUI/CUI. How ppl. using it, etc.

Otherwise I'm lost. (The white window effect" DVS talked about.)
First off, I think I made a mistake by including JScript in the title of this thread. I've removed that now to avoid confusion. JScript isn't needed at all, although some of the data this component returns can only be easily consumed in JScript because normal title formatting scripts don't have loops.

If you're not using JScript the simplest thing to do is just display the playcount using this component.
That's easily done with:
Code: [Select]
$max(%play_count%,%lastfm_play_count%)

You can replace any reference to %play_count% in your themes with the above and now you'll have more accurate play counts.  You can just drop this as a column in your DUI playlists if you like.

Now, if you have a JScript panel, you can get really fancy and use the %lastfm_played_times_js% to iterate over the played times and do cool stuff like I do in my Georgia theme:

There I'm plotting every play of a song on a timeline. This is obviously a pretty complex process, and a lot of code is involved, so it's beyond the scope of this thread. I'd recommend checking out the Georgia thread and downloading the code if you'd like to know more.

Quote
Why so many "hasNonPunctChars" entries?
Ack! That code is called a bunch and can get triggered easily. That little debug log was left in by accident. I'll release a new version shortly to stop spamming the console.

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

Reply #143
Ack! That code is called a bunch and can get triggered easily. That little debug log was left in by accident. I'll release a new version shortly to stop spamming the console.
[/quote]

pet peeve for awhile now - I always thought I had some errant JSpanel spamming a service. It's great to finally know where it's coming from.

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

Reply #144
pet peeve for awhile now - I always thought I had some errant JSpanel spamming a service. It's great to finally know where it's coming from.
Really sorry about that. Just uploaded v3.0.5 which should stop the spam!

Turns out I never noticed because on my primary playback machine I was still on v3.0.2 haha :/

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

Reply #145
If you're not using JScript the simplest thing to do is just display the playcount using this component.
That's easily done with:
Code: [Select]
$max(%play_count%,%lastfm_play_count%)

You can replace any reference to %play_count% in your themes with the above and now you'll have more accurate play counts.  You can just drop this as a column in your DUI playlists if you like.

Now, if you have a JScript panel, you can get really fancy and use the %lastfm_played_times_js% to iterate over the played times and do cool stuff [...]
Hey, thank you very much for clearing this out to me 8-)

I checked your really eyecatching images of your fine theme and it is really impressive to me (also the good understandable documentation!), but decided not to try it, because I'm more a "technical" user which "needs" no visual eyecandy, but purely text information to easy recognize on the screen 8-)

So, if not using JScript panel, I only can show the playount (fetched from last.fm) ?
forget about that, I have tried the variables from the wiki...
Code: [Select]
$char(10)#####$char(10)
$rgb(255,0,0)$char(10)lastfm_played_times: $rgb(0,0,0)%lastfm_played_times%
$rgb(255,0,0)$char(10)lastfm_added: $rgb(0,0,0)%lastfm_added%
$rgb(255,0,0)$char(10)lastfm_last_played: $rgb(0,0,0)%lastfm_last_played%
$char(10)#####$char(10)
(I have followed your advice with the column in CUI and it worked good, thanks!)

I was wondering, if I just can simply show the dates when the current playing song was played, but this seems only possible with JScript, which, lets face it, I'm only able to copy and paste code into, but cannot iterate over an array or just show a dumb line of text ;-/  yeah, embarassing, but true :-)

Maybe someone can contribute a small script for the wiki page, for copy/paste-users like me, which shows a simple text list with the last played dates of the current selected song?  (This could be the first easy usable script on the wiki, users can grip, and the more scripts on the wiki, the more users might try and experiment with you fine component.)



 

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

Reply #146
Another (dumb) question:
in f2k, if we don't want to show an empty string/variable, we enclose it in [brackets].
And it greatly works with %lastfm_first_played%, but [%lastfm_played_times%] shows [] if its empty.
How can I suppress the [] ?

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

Reply #147
aaaaaand another question:
(f2k 1.4.1, component 3.0.5)

to check the output of your fine component, I've played "funky town" some times in a row.
this is my code which I put into an Items Detail Panel via CUI.
Code: [Select]
$rgb(255,0,0)lastfm_play_count: $rgb(0,0,0)$max(%play_count%,%lastfm_play_count%)$char(10)
$rgb(255,0,0)lastfm_added: $rgb(0,0,0)%lastfm_added%$char(10)
$rgb(255,0,0)lastfm_last_played: $rgb(0,0,0)%lastfm_last_played%$char(10)
$rgb(255,0,0)lastfm_first_played: $rgb(0,0,0)%lastfm_first_played%$char(10)
$rgb(255,0,0)lastfm_played_times: $rgb(0,0,0)%lastfm_played_times%$char(10)
$rgb(255,0,0)played_times: $rgb(0,0,0)[%played_times%]$char(10)

I don't get why all of the lastfm_*-variables are empty.
The "normal" variables (%play_count% and %played_times%) work fine.

Please see the attached screenshots (unfortunately, I'm not able to add them visible inside this post).

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

Reply #148
Me, again,

I have set a Column in CUI and it works fine.
Code: [Select]
$puts(T,[%lastfm_last_played%])
$puts(TT,
$year($get(T)).
$month($get(T)).
$day_of_month($get(T))
$left($time($get(T)),5)
)
$if($get(T),$get(TT),)

Unfortunately the %lastfm_last_played% and %lastfm_first_played% and %lastfm_added% return 2011.02.23 21:08, which is the date, I scrobbled it the first time (I guess).
%lastfm_last_played% is not correct, because I played it some times last month. (Its on page 11 on the last.fm website and I played a lot of songs in the meantime).

I guess, this is because?
Unfortunately, Last.fm is slow. I must query by Artist, and can only pull 200 scrobbles at a time. For the first last.fm check of a song, I will pull up to 1000 scrobbles (5 API calls) and then attempt to match them. For all subsequent calls for songs by that artist the API responses are placed in an LRU cache, meaning they should be essentially instantaneous. By default I store up to 20 API responses, although this number can be increased to 50 in the preferences.

At the moment Last.fm calls are blocking on the UI.

I have set the size of the last.fm response cache to 40.

What would be a reasonable size to set it up?
(So the last.fm server is not annoyed *and* I'm getting at least the last 3 months reflected)
I don't want to set it to something I don't understand and cause bad results...

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

Reply #149
Please ignore this question, because after a f2k restart it shows all the variables content, if any. Dunno why and what that caused... (sometimes, the data seems not to be realtime, but a play behind)
aaaaaand another question:
(f2k 1.4.1, component 3.0.5)