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 386928 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 #525
ok, here: http://cid-649d3bfeaf541fbb.office.live.co...ging%20mode.txt

i'm sure you know the drill by now but a few reminders anyway....

-no library import support
-requires "marc2003" folder saved in %appdata%\foobar2000 (you already have this from using my autoplaylists sample the other day. it's also contained in the zip linked on the first post of this thread)
-you can customise the file tag names at the start of the script - obviously alter your columns to match
-right click the panel to set your username/api key
-you now have support for auto-correction. but if you turn it off on the website, you need to make sure you turn it off on the script as well (again using the context menu)
-you can now unlove tracks
-it now runs at the same time a scrobble would count so the playcounts should always be in sync.

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

Reply #526
Code: [Select]
Skipping track...
Error: WSH Panel Mod (Playcount Sync by marc2003): Microsoft JScript runtime error:
Object required
Ln: 83, Col: 3
<source text only available at compile time>

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

Reply #527
i'm assuming that's a problem with the file tagging version i posted above?

i don't have any problems using the main version with foo_skip. i'll look into it....

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

Reply #528
nevermind, seems it's because my files is read only (some of them inside a zip file)

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

Reply #529
i've just checked and it is a problem that will happen with the file tagging script with foo_skip/rating set to 1 with any file. i've updated it - same link as above.

EDIT: i've double checked with zipped files, foo_skip enabled and a rating of 1.

just to be clear again, this does not affect the main script in the OP that uses foo_customdb.

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

Reply #530
ok, here: http://cid-649d3bfeaf541fbb.office.live.co...ging%20mode.txt

i'm sure you know the drill by now but a few reminders anyway....

-no library import support
-requires "marc2003" folder saved in %appdata%\foobar2000 (you already have this from using my autoplaylists sample the other day. it's also contained in the zip linked on the first post of this thread)
-you can customise the file tag names at the start of the script - obviously alter your columns to match
-right click the panel to set your username/api key
-you now have support for auto-correction. but if you turn it off on the website, you need to make sure you turn it off on the script as well (again using the context menu)
-you can now unlove tracks
-it now runs at the same time a scrobble would count so the playcounts should always be in sync.


<3 forever

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

Reply #531
First thanks for such an ingenious solution to something I've wanted to do for awhile.

I'm having problems with the script freezing when doing a full library import though. For example right now it's stuck at "Completed page 411 of 499 (playcount)" and hasn't advanced for an hour. When I try restarting foobar it pauses at other points (page 360 last time) but never seems to get to the end.

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

Reply #532
hmmn, i really need to implement something a little more robust. my script expects last.fm to reply to every request in a timely fashion otherwise it just conks out. i have a few ideas on how to fix it but i won't be able to do it until monday. i'm currently away from home and i can barely navigate the internet with the crappy trackpad on my laptop let alone do anything more serious.

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

Reply #533
hmmn, i really need to implement something a little more robust. my script expects last.fm to reply to every request in a timely fashion otherwise it just conks out.

No worries, glad to know it's not just me.

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

Reply #534
hmmn, i really need to implement something a little more robust. my script expects last.fm to reply to every request in a timely fashion otherwise it just conks out. i have a few ideas on how to fix it but i won't be able to do it until monday. i'm currently away from home and i can barely navigate the internet with the crappy trackpad on my laptop let alone do anything more serious.

I'm also waiting to your solution to this problem. I did come to one (currently used in my code), but it works not quite well (it rarely crashed but heck it can). I have another solution in mind but it's too much rewrite that I haven't wanted to touch. Both do not rely on external supported interfaces or methods. If only I can find a way to use property timeout and method ontimeout here http://msdn.microsoft.com/en-us/library/ms...v=VS.85%29.aspx but I couldn't.

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

Reply #535
i was thinking of writing the results to file after every page is fetched. so if it stops, the user can start it again from a page of their choosing.

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

Reply #536
I got it work by waiting and doing it a different time. Amazing plugin, I was able to retrieve 227 extra days of listening statistics compared to what I had saved locally.  This is awesome because now when listening to unplayed tracks, I can come closer to truly getting unplayed tracks. Thanks!

Question: Is there anyway to bulk love tracks that I rated good on my end (ie. sync ratings back to last.fm)? Also is there anyway to simultaneously rate a track as %rating% and love it on last.fm at the same time? When I try double assigning the keyboard shortcut I use only one of them works.

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

Reply #537
i was thinking of writing the results to file after every page is fetched. so if it stops, the user can start it again from a page of their choosing.

Hum, the recent last.fm server outage caused my script to hang indefinitely on http request because I have no way to timeout the operation with available methods and stuffs. I think your method solve a different case than this one.

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

Reply #538
i doubt i'll be able to implement timeouts either which is why i want to save each page to file. then if it conks out on page 411 of 499, the user won't have to start again from scratch which i think will be quite helpful. obviously it will require manual intervention from them watching the console but i don't really know how else to solve it.

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

Reply #539
Couldn't you just output the last fetched (is this a word?) page number to the first line of the said file besides the console? That way when running the script, it checks if the cache file exists, if so, it then kicks into "continue mode", picking up at the page written on the file. Upon succesfull fetching of all pages the cache file is then deleted and the world moves on

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

Reply #540
new version uploaded: http://cid-649d3bfeaf541fbb.office.live.co...ount%20sync.zip

library import: now retries automatically if last.fm stops responding. does not require any user interaction.

i tested with a few different 50,000+ track libraries (not mine) and all went ok.

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

Reply #541
Thanks for the update! Any idea about bulk syncing highly rated tracks to last.fm?

BTW: Any thought of putting a donation link up for your hard work?

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

Reply #542
there is no proper way to bulk submit loved tracks. having said that, you could modify the script to automatically love tracks as they are played if they meet certain criteria. i did have this feature in a very old version of this script. i could tell you how to do that if you're interested.


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

Reply #543
new version: http://cid-649d3bfeaf541fbb.office.live.co...ount%20sync.zip

auto-love track feature brought back from the dead. it's off by default but you configure it using the context menu. the "condition" dialog will give you info on how to use it. if enabled, it waits until 3 seconds of the track has played before it runs.

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

Reply #544
new version: http://cid-649d3bfeaf541fbb.office.live.co...ount%20sync.zip

auto-love track feature brought back from the dead. it's off by default but you configure it using the context menu. the "condition" dialog will give you info on how to use it. if enabled, it waits until 3 seconds of the track has played before it runs.


You are a scholar and a gentleman. Can't wait to try this out.

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

Reply #545
Any chance that in future updates you can let us know which files need to be replaced? It isn't much work to replace everything but, you know...

Thanks for the hard work, I love this program. (Although I still get an error when I quit foobar.)

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

Reply #546
always import "playcount sync.txt" into the panel. that changes on every update.

and that should be enough 99.9% of the time. i try not to change anything else unless i have to. i usually mention in the post if the "marc2003" folder needs extracting again. and the configuration folder (foo_customdb.dll.cfg) never changes (well it has once but that was  a major change and is unlikely to happen again).

as for your error, all i can suggest is making sure your components are the latest. what actually happens?

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

Reply #547
always import "playcount sync.txt" into the panel. that changes on every update.

and that should be enough 99.9% of the time. i try not to change anything else unless i have to. i usually mention in the post if the "marc2003" folder needs extracting again. and the configuration folder (foo_customdb.dll.cfg) never changes (well it has once but that was  a major change and is unlikely to happen again).

as for your error, all i can suggest is making sure your components are the latest. what actually happens?


As long as foobar has attempted access to Last.fm at least once, when I close foobar:
***
Runtime Error!

Program: C:\Program Files (x86)\foobar2000\foobar2000.exe

R6025
- pure virtual function call

*Press OK*

foobar2000 has stopped working
A problem caused the program to stop working correctly. please close the program.
CLOSE THE PROGRAM.
***
Nothing else.

Code: [Select]
Faulting application name: foobar2000.exe, version: 1.1.5.0, time stamp: 0x4d6aa984
Faulting module name: foobar2000.exe, version: 1.1.5.0, time stamp: 0x4d6aa984
Exception code: 0x40000015
Fault offset: 0x0013d397
Faulting process id: 0xa88
Faulting application start time: 0x01cbdaac5dbb77ce
Faulting application path: C:\Program Files (x86)\foobar2000\foobar2000.exe
Faulting module path: C:\Program Files (x86)\foobar2000\foobar2000.exe
Report Id: 26f25a6c-46d4-11e0-afed-005056c00008

 

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

Reply #548
@Zageron: Which OS are you using? I'm on Windows 7 64bit and I have the same error, thinking this is an error that happens with certain combination of OS version/flavor and foo_customdb.

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

Reply #549
I'm on Windows 7 64bit and I have the same error


that's my main OS and i've never seen that error. i also use windows XP SP3 (x86) and windows XP SP2 (x64) a lot and again, not a single problem.

latest component versions:
Code: [Select]
foo_customdb.dll (2010-03-04 13:10:54 UTC)
    Custom Database 0.1.0_beta1
foo_softplaylists.dll (2011-02-05 09:23:59 UTC)
    Soft Playlists 2011-02-05
foo_uie_wsh_panel_mod.dll (2011-01-08 08:11:34 UTC)
    WSH Panel Mod 1.4.2