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 386354 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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

Reply #475
sqlite3 seems to update to version 3.74, what you supply seems older.

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

Reply #476
edit: nvm....

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

Reply #477
Loving the script, but I am having one issue... I think because I use the field re-mapping "[$meta(artist,0)]" in the audioscrobbler plugin, your script isn't able to match the last.fm stats to the tracks in my library. I tried replacing all instances of '%artist%' with '$meta(artist,0)', and after doing that it now syncs whether a track is loved or not—but still no playcount gets returned.

-Devin.
O Agatha, you are tiresome.

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

Reply #478
Correct me if I'm wrong (and the documentation FAQ too), but doesn't your mapping add 0 as a separator in the case there are multiple artists in the field? If so then it should be scrobbling something like "Artist0ContrArtist" instead of "Artist, ContrArtist". Perhaps you could tell your Last.fm username in order to check the scrobbles (Maybe spell-correction kicked in or something)

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

Reply #479
Nope, it returns only the first value, so if I have multiple artists tagged to the track (say, featured artists), instead of scrobbling:

Artist, Featured Artist - Track

...it scrobbles:

Artist - Track

-Devin.

Edit: here's a track I had a hard time with:

http://www.last.fm/music/Sister+Rosetta+Th...aim+Jesus+First

%artist% - %title% results in:

Sister Rosetta Tharpe, Sam Price Trio - I Claim Jesus First

If i change %artist% to $meta(artist,0) in lines 42 and 47 in the WSH configuration window, this track will show up as "Loved" (but the script doesn't return playcount data for ANY tracks anymore)... if I leave it alone, I get nothing returned for this track (no playcount and no indication that it's a loved track), but other tracks unaffected by this quirk work properly.
O Agatha, you are tiresome.

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

Reply #480
if you just change line 42 then that should work for you. don't change line 47 as that needs to match the database configuration which you don't really want to mess with.

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

Reply #481
Worked, thanks.

-Devin.
O Agatha, you are tiresome.

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

Reply #482
new version uploaded.

http://cid-649d3bfeaf541fbb.office.live.co...ount%20sync.zip

nothing new, just a little tidying up.

-moved a few context menu items into sub-menus so they make more sense.
-updated documentation explaining auto-correction limitations when doing a library import

anybody upgrading must make sure they extract the new scripts folder from the zip and import the new playcount sync.txt file. you can delete sqlite3.exe and lastfm_sql.cmd from the foobar root directory. i've placed new copies inside the scripts folder to keep the root directory a little cleaner. don't move the old files as i've made some changes.

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

Reply #483
Again, can't setup it for user-separated config

After importing of script text, wsh panel don't show any icon, only "set api key" "set lastfm username", etc. in the context menu
Library import commands are unavailable

here is info from console:

Code: [Select]
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "C:\Users\Администратор\AppData\Roaming\foobar2000\\marc2003\common.js"
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "C:\Users\Администратор\AppData\Roaming\foobar2000\\marc2003\tooltip_buttons.js"
WSH Panel Mod (Playcount Sync by marc2003): initialized in 35 ms
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "C:\Users\Администратор\AppData\Roaming\foobar2000\\marc2003\common.js"
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "C:\Users\Администратор\AppData\Roaming\foobar2000\\marc2003\tooltip_buttons.js"
WSH Panel Mod (Playcount Sync by marc2003): initialized in 3 ms


marc2003 and playcount sync folders are placed into foobar2000 profile folder

add:

The same problem even with portable foobar2000:

Code: [Select]
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "E:\Program Files\foobar2000\\marc2003\common.js"
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "E:\Program Files\foobar2000\\marc2003\tooltip_buttons.js"
WSH Panel Mod (Playcount Sync by marc2003): initialized in 4 ms
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "E:\Program Files\foobar2000\\marc2003\common.js"
WSH Panel Mod (Playcount Sync by marc2003): Parsing file "E:\Program Files\foobar2000\\marc2003\tooltip_buttons.js"
WSH Panel Mod (Playcount Sync by marc2003): initialized in 4 ms


What's wrong?
🇺🇦 Glory to Ukraine!

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

Reply #484
do you have a playlist with something in? it won't show a button if there are no playlists or if the playlist is empty.

edit: i've just tested with "Администратор" in the path and that works fine as well.

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

Reply #485
Quote
do you have a playlist with something in?


Oh, sorry, I forgot it. Thanks for reminding

Hope now it will work fine...
🇺🇦 Glory to Ukraine!

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

Reply #486
Code: [Select]
working....
Error: unable to open database "C:\Users\└фьшэшёЄЁрЄюЁ\AppData\Roaming\foobar2000\customdb_sqlite.db": unable to open database file



the same problems with custom_db and cyrillic characters
🇺🇦 Glory to Ukraine!

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

Reply #487
i guess that's because i'm working from the command line to update the DB. i don't think there is anything i can do about that.

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

Reply #488
Marc, have you tried to use short path in your code? I haven't taken a look at your code but I solved the same problem with wget using Windows short path.

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

Reply #489
^thanks for that. it should now be fixed.

@Steve, you'll need to download and extract the folder contents again and import the updated script.

and now it displays a button even with empty playlists so as not to confuse people.

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

Reply #490
Excellent!
Thank you guys.
🇺🇦 Glory to Ukraine!

 

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

Reply #491
if anybody has upgraded to the latest version of foo_softplaylists and finds their "love/unlove" button not working anymore, you need to replace line 46 with this....

Code: [Select]
command = "Last.fm " + (old_userloved == 1 ? "Unlove" : "Love") + " Track '" + track + "' by '"+ artist + "'";



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

Reply #492
if anybody has upgraded to the latest version of foo_softplaylists and finds their "love/unlove" button not working anymore, you need to replace line 46 with this....

Code: [Select]
command = "Last.fm " + (old_userloved == 1 ? "Unlove" : "Love") + " Track '" + track + "' by '"+ artist + "'";


Is it only possible with this command or does "Last.fm Love Track" also work?
Normally I leave this command unchanged (given by get_item_name).
But if the displayed command (given by context_get_display) only works I must remeber to not change it also.

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

Reply #493
because it's triggered through a WSH panel mod function called fb.RunContextCommandWithMetadb(), it has to be an exact text match to what is displayed on the context menu.

it's no issue at all really (so long as you don't change it on every release  - please    ).

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

Reply #494
Every time I close foobar.


Edit: By the way this is amazing! Thanks so much for supplying the public with this plugin. It makes recording play counts and song information so easy, especially cross-computer/cross-format.

:]

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

Reply #495
well that has to be a component error of some sort. if you're sure that error has only appeared since you installed this package maybe you can try and isolate which component causes that? try removing each one in turn until the error goes away? (wsh panel mod, foo_softplaylists, foo_customdb)

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

Reply #496
The recent soft-playlist update, seems to have fixed it. Will update if it comes back. (It's been giving me an error ever since I installed your addon.) (Like in December)

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

Reply #497
Hello,

I have followed your instructions to the letter, installed the script and it seems to be functioning... but I'm not getting any increased playcounts. It's been almost a month since I started using it, and playcount stats remained at a normal level, despite listing on a daily basis.

The console reports everything is working the way it's supposed to, but still nothing happens.

Console Screenshot

Am I doing something wrong?

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

Reply #498
well i don't know what's going on there. the fact it says "OK" means the value is different from before.

anyway, find line 113 in the script. it should be this....
Code: [Select]
    if(fb.IsPlaying && time_elapsed >= target_time) {


now insert these 2 lines directly after it....

Code: [Select]
        fb.trace("Old value: " + old_userplaycount);
        fb.trace("New value: " + userplaycount);


now see what the console says after a few more plays.

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

Reply #499
Hi. this is a great tool and I've been looking for something like this for a very long time.
I've been trying to get it working under wine in linux for a few days now and I followed the instructions but when I try to input my username/API key I don't get a window or anything to actually input it (a wine problem obviously).
I've been reading this thread and read about an external files that holds this information. could you tell me where is it located and exactly what name should I give to it and what information should I put in said file? I tried changing it at the beginning of the script (var username_file = settings_path + "username"; var api_key_file = settings_path + "api_key";) but that doesn't seem to work at all.

the script seems to be working fine, but I'm stuck here according to foobar console.  "Playcount sync: Can't contact Last.fm. Check your username / API KEY settings. " and since I can't actually input that information, well, you can imagine.

Thanks a lot.