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 385536 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 #1150
!!! I wondered about that file, I didn't know if it was part of this panel or not. Thanks.

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

Reply #1151
Today I have accidentally found out the following lines in console:

Code: [Select]
Last.fm Playcount Sync: Contacting Last.fm.... 
Last.fm Playcount Sync: {"error":26,"message":"Suspended API key - Access for your account has been suspended, please contact Last.fm","links":[]}

What could possibly go wrong? And what should I do about it? I tried re-getting the key but the problem still persists.

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

Reply #1152
right click the icon and select Configure. if the 2nd line of code matches this...

Code: [Select]
// @import "%fb2k_profile_path%marc2003\common8.js"


then simply close the dialog, right click the panel and Update script.

if that line references common7 (or earlier) then you need to download this zip file...

https://dl.dropboxusercontent.com/u/2280132...ount%20sync.zip

extract the marc2003 folder into your profile and overwrite any files if prompted. then copy the text from the playcount sync.txt file into your panel. you will need to configure your username and preferences again.

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

Reply #1153
Thank you, mark2003. You've just saved my day!

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

Reply #1154
hi marc, is there a way to love a track with a global shortcut? sometimes im listening to music while gaming and then i dont want to alt-tab to love a song. thanks

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

Reply #1155
it's not possible with any script - the panel has to have focus for keyboard shortcuts to work.

you'd have to use the foo_softplaylists component to do that. you can set up global shortcuts through the main foobar preferences. to keep the local database up to date, you could bind another keyboard shortcut to the Customdb Love 1 action found on the context menu under Legacy Commands (unsorted). that's 2 key presses but it's the only way.

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

Reply #1156
it's not possible with any script - the panel has to have focus for keyboard shortcuts to work.

you'd have to use the foo_softplaylists component to do that. you can set up global shortcuts through the main foobar preferences. to keep the local database up to date, you could bind another keyboard shortcut to the Customdb Love 1 action found on the context menu under Legacy Commands (unsorted). that's 2 key presses but it's the only way.

thanks a lot! i configured autohotkey to press the shortcuts in succession =D

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

Reply #1157
hmm i realised i was wasting shortcuts the way i described above so im trying to do it with the command line. i cant figure out for the life of me why this isnt working
Code: [Select]
C:\Program Files (x86)\foobar2000\foobar2000.exe /playing_command:Customdb Love 1

it just tries playing a track called "love" and "1". i guess it has to do with the spaces in the command but ive tried every combination of quotation marks but to no avail

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

Reply #1158
okay i got it to work. if anyone else wants to achieve this: you will need foo_runcmd, foo_softplaylists, autohotkey and marcs script ofcourse
this is the autohotkey script (in my case the shortcut is bound to right control and L)
Code: [Select]
Rcontrol & l::
Run, C:\Program Files (x86)\foobar2000\foobar2000.exe /runcmd-playing="Legacy Commands (unsorted)/Customdb Love 1"
Run, C:\Program Files (x86)\foobar2000\foobar2000.exe /runcmd-playing="Last.fm/Last.fm Love Track"
return

(sorry marc for spamming your thread)

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

Reply #1159
Is it supposed to be possible to create an autoplaylist? I'm able to create one and use it while foobar2000 runs but Foobar crashes immediately upon startup unless i delete the offending autoplaylist.
Was hoping to catch files that were played on last.fm but not in playcount with "((%LASTFM_PLAYCOUNT_DB% GREATER 0) AND NOT (%play_count% GREATER 0))"

Love the plugin anyways.

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

Reply #1160
autoplaylists should be possible but it seems foo_customdb chokes on larger collections. someone else has reported this just in the last few days. and because it's a component problem, unfortunately there isn't anything i can do about it. i'm currently trying to test what the cut-off point is before it falls over so at least i can put a warning in the instructions.

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

Reply #1161
That would make sense. My collection is rather large at 83579 tracks over 1.24TB.
I'll copy my portable foobar application and see where the breaking point might be by including fewer and fewer folders.

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

Reply #1162
any information you could provide on this would be great. i'm not really able to test myself as i have such a tiny collection. i suppose i could create a library of dummy files but real world is always better.

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

Reply #1163
Is it supposed to be possible to create an autoplaylist? I'm able to create one and use it while foobar2000 runs but Foobar crashes immediately upon startup unless i delete the offending autoplaylist.
Was hoping to catch files that were played on last.fm but not in playcount with "((%LASTFM_PLAYCOUNT_DB% GREATER 0) AND NOT (%play_count% GREATER 0))"

Love the plugin anyways.

i think that tracks without any lastfm plays do not have a %LASTFM_PLAYCOUNT_DB% entry yet. so it cant be compared with 0. filter for tracks that have a %LASTFM_PLAYCOUNT_DB% at all.

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

Reply #1164
any information you could provide on this would be great. i'm not really able to test myself as i have such a tiny collection. i suppose i could create a library of dummy files but real world is always better.


I should note I am using Foobar 1.36
I went down in increments of about 5,000 tracks each (my folders are organized by letter - ie. [A],,[C] -  so I just started deleting each one).
From 83579 to 60,000 and every time I tried to create an autoplaylist it would crash.
From 60,000 to 40,000 I could create an autoplaylist but on startup it would crash and I'd have to delete the playlist file and reset the index file.
I didn't manage to add an autoplaylist and then restart successfully until 33678 files.

I had the same crash error as trebordean. Obvious that custom_db was just choking.

Now I do use dyn_fil and that does add a little bit extra to startup time and I do have a LOT of autoplaylists so that can't help.

However I did see in the other thread that trebordean reverted to Foobar 1.29 so i thought I'd rescan my full library and try. Lo and behold.. Foobar2000 starts MUCH quicker and even creating the autoplaylist was MUCH quicker.
Restart was fine and all 83579 files were able to be processed with the autoplaylist. Reverting to 1.29 did break my foo_discogs and foo_verifier components.

This must (mostly) have to do with custom_db not being updated in a while and having some problem with the newer foobar2000. I'm going to keep my main config at 1.37 and just forgo having autoplaylists.. kind of isn't the best solution but ah well.

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

Reply #1165
some good info there, thanks. i'll try and replicate the issue with some dummy files. it would nice to confirm that anything under 30k is fine. i'll update my webpage before the weekend is over.

i don't know what it is about foobar v1.3 and above that causes issues. i know there were changed to how it caches metadata for library/playlist but i always thought it was related to oversize fields.

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

Reply #1166
Hmm I think I may have to stop using your plugin with my large collection unfortunately - or give up on a couple other components and go back to 1.29. I left my computer running with the playlist (not auto) generated from my 1.29 portable foobar copy of my main 1.36 portable install (the one with tracks played on last.fm but not played in my library) - so that I could get my playback stats perfect.
I've found the easiest way to fake playcounts with foo_playcount is to use foo_preview (set to 1:01) and that was my main reason for creating the autoplaylist (sometimes foobar crashes and I lose my foo_playcount stats).

And well I came back to custom_db having the same fit as when I add or startup with an autoplaylist. Crashed on me after several hours of just playback. 

So it seems that with a large collection (30,000+tracks) on 1.3+ even just simple playback is enough to crash Foobar.

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

Reply #1167
i could provide a version that avoids using foo_customdb but it would mean writing to file tags instead - there are limitations on that such as no support for cuesheets, streams, untaggable formats, etc.

also, it can't support the library import* but the background playcount updates and loving/unloving tracks would be full functional. it's not an approach i like because of the modificiation of file timestamps and how it affects backups but i could add it without too much hassle.

*but you can transfer existing foo_customdb data to file tags easily enough.

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

Reply #1168
Playcount sync is not working due to suspended API key again. but this time updating the script doesnt work either:
Code: [Select]
Last.fm Playcount Sync: <!DOCTYPE html>
<html>
<head><title>Dropbox - 404</title>
<link href="//www.dropbox.com/static/css/error.css" rel="stylesheet" type="text/css"/>
<link rel="shortcut icon" href="//www.dropbox.com/static/images/favicon.ico"/>
</head>
<body>
<div class="figure">
<img src="//www.dropbox.com/static/images/psychobox.png" alt="Error: 404"/>
</div>
<div id="errorbox">
<h1>Error (404)</h1>We can't find the page you're looking for. Check out our <a href="https://www.dropbox.com/help">Help Center</a> and <a href="https://forums.dropbox.com">forums</a> for help, or head back to <a href="https://www.dropbox.com/home">home</a>.
</div>

</body>
</html>

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

Reply #1169
I've faced the same problem today in the middle of the playing. The tracks were syncing and suddenly they stopped. Is it time to update scripts once again?
Some debug info if needed:
Code: [Select]
// ==PREPROCESSOR==
// @import "%fb2k_profile_path%marc2003\common8.js"
// @name "Last.fm Playcount Sync"
// @author "marc2003"
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==


Today I have accidentally found out the following lines in console:

Code: [Select]
Last.fm Playcount Sync: Contacting Last.fm.... 
Last.fm Playcount Sync: {"error":26,"message":"Suspended API key - Access for your account has been suspended, please contact Last.fm","links":[]}


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

Reply #1170
follow these instructions to fix the syncing problem. apparently marcs dropbox is also not reachable so updating isnt possible atm

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

Reply #1171
follow these instructions to fix the syncing problem. apparently marcs dropbox is also not reachable so updating isnt possible atm

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

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

Reply #1172
I have an api account, but I need to create it again?
last.fm | bulletproof2k

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

Reply #1173
Thanks, Odinos, that worked for me.

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

Reply #1174
I fixed it.
In my last update script common8.js
other line numbers:
1820
1821

Thanks 
last.fm | bulletproof2k