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: HOW TO: synchronise your last.fm playback stats with foobar (Read 389126 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #575
batch unlove? you shouldn't be so fickle changing your minds like that.

and although it's not possible to batch "love" tracks, you can setup automatic loving of tracks when they are played based on any criteria you can come up with using foobar title formatting.


Haha, sometimes music we listened to from years go doesn't really... well apply so much now.

My tracks won't 'unlove' when I click the love button, like Zageron said it should. Which is somewhat odd considering I could of sworn it used too. Hm...

EDIT: Aha, my WSH Panel mod doesn't seem to work anymore. I set up another button for setting skip on tracks as well, and that has also stopped working. The legacy commands work fine, just not the panels. I wonder why that isn't working anymore, I'm sure I haven't changed anything and I haven't updated my foobar since installing the components either.

Make sure you are using 1.4.3
http://code.google.com/p/foo-wsh-panel-mod/downloads/list

HOW TO: synchronise your last.fm playback stats with foobar

Reply #576
That is the version I am using. I just tried deleting it, re-downloading it and putting it back in but still the same issue. :/


HOW TO: synchronise your last.fm playback stats with foobar

Reply #577
does loving tracks still work? also, the foo_softplaylists component which is used to love/unlove tracks leaves it own messages in the foobar console as to whether it's successful or not. have you checked there?

HOW TO: synchronise your last.fm playback stats with foobar

Reply #578
Loving and unloving tracks still works, just not from the panel mod.

When I had removed the WSH panel mod from my layout, then put it back on, the loved tracks panel crashes upon startup and I get the message:

Scripting Engine Initialization Failed (Playcount Sync by marc2003, CODE: 0x80020101)
Check the console for more information (Always caused by unexcepted script error).

In the console, I get the following:

Watching: X:\Documents\My Music\My Music Library
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "C:\Users\Administrator.Zaks-PC\AppData\Roaming\foobar2000\marc2003\common.js"
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "C:\Users\Administrator.Zaks-PC\AppData\Roaming\foobar2000\marc2003\tooltip_buttons.js"
Error: WSH Panel Mod (Playcount Sync by marc2003): Microsoft JScript runtime error:
Automation server can't create object
Ln: 359, Col: 1
<source text only available at compile time>
WSH Panel Mod ({511683A5-0876-4012-A61A-7E668A836948}): Parsing file "C:\Program Files (x86)\foobar2000\\scripts\dui_buttons.js"
WSH Panel Mod ({511683A5-0876-4012-A61A-7E668A836948}): initialized in 12 ms
Custom Database: Initialize
Custom Database: table quicktag already exists (1)
Custom Database: table database_version already exists (1)
Custom Database: index url_idx already exists (1)
Custom Database: Completed
Startup time : 0:00.395500
Seekbar: taking Direct2D1 path.
Seekbar: Frontend initialized.

For some reason the scripts won't initialise it seems, but I checked the directory and they're definitely there. I haven't modified them in anyway, and like I said, this used to work just fine until it stopped working about a week ago. :/

HOW TO: synchronise your last.fm playback stats with foobar

Reply #579
Quote
Automation server can't create object


this means you haven't disabled WSH panel mod "safe mode" in the foobar preferences. it does mention this in the readme.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #580
Oh, that must of been re-enabled when I deleted the WSH panel mod and put that back in! Silly me.

Anywho, I'm back to the issue of the buttons not actually working now. I can't for the life of me figure this out. I haven't tinkered with the code in anyway, and it definitely leeds to my foobar2000 profile path. There's no errors in the console, and loving/unloving tracks works just fine through the legacy commands. I did reset my last.fm plays recently, perhaps that might have something to do with it?

Furthermore when I right mouse click on the love track panel and try to set my last.fm username or api key, nothing shows up there either. However, right mouse clicking on 'Visit your last.fm profile page' does work. There must be a conflict somewhere, but I just can't figure out where. I haven't installed any new components since I first started using this script.

Also, would just like to add I got my other panel to work, I must of ended up tinkering with the code at somepoint to try and make something else happen which is why that didn't work, so this doesn't seem to be an issue with the WSH Panel mod itself.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #581
I don't know if this is related, but it seems like my script has stopped triggering soft_playlists. I am using the old one that still tagged the files, and it says the following in the console:

[17:17:52] Playcount sync: Auto-love is on. Triggering soft_playlists....

But nothing else happens. No message from soft_playlists, and (more importantly) no change on last.fm. I don't know when this changed, it seems like it was a while ago. My last loved track was in February (and I only love through this script).

EDIT: And safe mode is disabled.
EDIT2: I tried manually loving a track using softplaylists's menu command, and that worked... So there seems to be some kind of communication breakdown between the script and soft_playlist? Sorry about insisting on using such an outdated version, I know that's an annoying habit for a developer.


HOW TO: synchronise your last.fm playback stats with foobar

Reply #583
Nice, it took a bit of jiggling since my version of your script is very old, so the placement wasn't quite the same (and it needed to be love_command instead of just command), but this was exactly the hint I needed, thanks!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #584
WTF????


HOW TO: synchronise your last.fm playback stats with foobar

Reply #585
1) right click>configure and enable "pseudo transparency".
2) with the editor still open, edit the 2 variables "bw" and "bh" to 24. click ok.
3) right click the panel>background>none
4) hover the mouse over the panel and a tooltip which show you what you need to do.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #586
thank you!)
but in addition i changed this parameters too, now it's centered
is it right?

var top_margin = -2;
var left_margin = 13;




HOW TO: synchronise your last.fm playback stats with foobar

Reply #587
I tried removing all of my components and configuration files for them and even reinstalling foobar2000, and then re-downloading the components needed making sure they're the latest version, but I still have the same issue. Using the legacy commands through the menu works just fine, but the button simply won't work. I had copy and pasted the code exactly as it was in playcount sync.txt, and the marc203 folder is certainly in my foobar2000 profile folder. Like I said, this used to work, but for some reason it no longer does. When I try to set my last.fm username or API key, no box comes up for me to input them. :/

I must of done something wrong somewhere, but I just can't figure out what. I am certain I followed the instructions exactly as they were, I've gone through them several times. Also, safe mode is definitely disabled this time.

Ah well, if this is to be a mystery, I can live without it anyway. It is still a wonderful script though, and you have my thanks for creating it and helping me out.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #588
Marc, this is really weird but... After installing Windows 7 service pack 1, I keep having this particular script crash after awhile. Here's what the console says:

"Error: WSH Panel Mod ({18BD462A-FB22-45A3-BC2D-828BD4187711}): msxml3.dll:
The download of the specified resource has failed."

 

HOW TO: synchronise your last.fm playback stats with foobar

Reply #589
i doubt the problem is related to SP1. i've been running that since it came out in february with no problems.

you haven't been tinkering trying to strip out Internet Explorer from your system? or maybe a temporary glitch at the last.fm server end? other than that, i have no idea.....

HOW TO: synchronise your last.fm playback stats with foobar

Reply #590
i doubt the problem is related to SP1. i've been running that since it came out in february with no problems.

you haven't been tinkering trying to strip out Internet Explorer from your system? or maybe a temporary glitch at the last.fm server end? other than that, i have no idea.....


Nope to both.

HOW TO: synchronise your last.fm playback stats with foobar

Reply #591
Hello. My English is so poor that, I guess, I'll can't properly explain what exactly I want, sorry. But I hope you'll understand me.

All I need is to use %composer% tag in place of %artist%. So if I "love" track I want it to be added to lastfm database (and then downloaded the to local db) in format %composer% (not %artist%) - %title%, and I need the same for playcount of course. I replaced the %artist% with %composer% in audioscrobbler settings, but what should I do with playcount sync script (and custom db maybe)???
🇺🇦 Glory to Ukraine!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #592
@Fractal_Mortality. sorry i have no idea then.

@Steve Forte Rio

file>preferences>tools>custom database>fields tab

edit each of the 2 entries to become

Code: [Select]
$crc32($lower(%composer%%title%))


restart foobar (very important).

then edit the script

Code: [Select]
line 62:
artist = fb.TitleFormat("%composer%").EvalWithMetadb(g_metadb);


Code: [Select]
line 67:
crc32 = fb.TitleFormat("$crc32($lower(%composer%%title%))").EvalWithMetadb(g_metadb);


HOW TO: synchronise your last.fm playback stats with foobar

Reply #593
Thank you. Seems like playcount works fine for now. But now I can't love tracks with WSH button (it doesn't add anything to loved tracks, at all), only with context menu legacy command, but actually it loves %artist% - %title%

What would you advise me?
🇺🇦 Glory to Ukraine!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #594
ah sorry. that's a limitation of the foo_softplaylists component. it's hard-coded to use %artist% and %title% and can't be changed. maybe ask the author to add configurable fields?

HOW TO: synchronise your last.fm playback stats with foobar

Reply #595
As I expected.

Quote
maybe ask the author to add configurable fields?


Yes, I guess, this is the only way.

Anyway, thank you for you great script 
🇺🇦 Glory to Ukraine!

HOW TO: synchronise your last.fm playback stats with foobar

Reply #596
Nice!

How can i add Love Button in Default UI. I know how to do it with columns UI. but i want it in default thems? I neead a specific component or?


HOW TO: synchronise your last.fm playback stats with foobar

Reply #598
skydrive has gone to shite so i'm now using dropbox to host (and yes i'm aware of the security lapse they had this week but this is hardly sensitive.  )

could a moderator please replace the whole opening post with this....

//////////////////////////////////////////////////////////////////////////////
This isn't a plugin but a script which simply utilises 3 rather excellent components (WSH panel mod, foo_customdb and foo_softplaylists) to do the following:

-it can trigger foo_softplaylists to love/unlove tracks on last.fm via a button.
-it can automatically love tracks when they are played based on title formatting (for example, it can be set to automatically love tracks with a RATING of 5)
-it can import the playcount/loved tracks from your entire last.fm library into foobar. it uses foo_customdb so your files are not touched.
-after doing the library import it will automatically update in the background as you listen.
-works the same in both default and columns UI
-you can display/filter the data in any custom columns, library viewers, display panels, etc using these simple tags:

Code: [Select]
%LASTFM_PLAYCOUNT_DB%
%LASTFM_LOVED_DB% //has a value of 1 for loved tracks


full instructions can be found here: http://dl.dropbox.com/u/22801321/playcount%20sync.zip




HOW TO: synchronise your last.fm playback stats with foobar

Reply #599
How to this whole thing on a portable foobar installation?