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 388369 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 #1125
this has been requested numerous times and i would consider it but it's simply not possible. last.fm only separate tracks by artist/title when it comes to fetching play counts back via their webservices.

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

Reply #1126
aaaah, what a shame, thanks for considering it though.

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

Reply #1127
Is it possible to count the playback stats for an artist or an album not only for a specific track?

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

Reply #1128
not with this script.

you could try this separate script which displays your last.fm artist/album/track stats for a few selected time periods like last 7 days, 1 month, 3month, overall etc....

http://marc2003.x10host.com/lastfm-charts

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

Reply #1129
Hey there again. I don't know what happened, but most playcounts aren't beng displaying now. Only very few tracks have them, and they seem to be totally random. I'm displaying them with $if2(%lastfm_playcount_db%,)... tried bringing them back with the heart (auto-correct disabled, just like in my profile), but nothing changed (I even didn't get the close foobar message at the end, in case that's weird).

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

Reply #1130
what does the console report? that always has something to say.

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

Reply #1131
Hello marc2003,

I've been using your awesome script for years now, but recently (I'm not sure when exactly though) I began experiencing API errors, so I thought, well maybe it's time to update the script. So I clicked on "Update script" and got an error "Last.fm Playcount Sync: HTTP error: 12029". So I thought, ok, maybe my script is old enough for updates not to work, so I googled the latest version of the script and tried to "update", I got a newer foo_customdb.dll, new marc2003 folder and a new script, restarted foobar, updated the script and had to reenter my Last.fm username & password. After that I still got the big red X, saying "User the right click to enter Last.fm password". So now every time I try to enter my password I get "Last.fm Playcount Sync: HTTP error: 12031". And "Update Script" still gets me a 12029.

As far as I understand both 12029 and 12031 would mean that I am not connected to the internets, but I surely am, because if I wasn't I wouldn't be able to write this.

Do you or anyone elso have any ideas what I could do to get the script working again?

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

Reply #1132
i don't remember anything unusual. i'm 99% sure it said that it succeeded. i removed the panel to reinstall it again one of these days and see how that works.

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

Reply #1133
As far as I understand both 12029 and 12031 would mean that I am not connected to the internets, but I surely am, because if I wasn't I wouldn't be able to write this.


can you access this page in internet explorer?

https://ws.audioscrobbler.com/2.0/

even if you normally use another browser, you need to use IE to test.

@firewater, well see how you get on. i can only help if you're more specific with the details.


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

Reply #1135
well it looks like you have some kind of proxy/firewall that is blocking access to last.fm? or maybe a DNS issue? if you open a command prompt, do you get any result for this command.

Code: [Select]
nslookup ws.audioscrobbler.com


also, are you on some kind of managed network or is it your home connection?

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

Reply #1136
That's my home connection.

> nslookup ws.audioscrobbler.com
Server:  ### - My Router Pseudo Domain
Address:  192.168.1.1

Name:    ws.audioscrobbler.com
Address:  195.24.233.55

I have tried disabling firewall yesterday before writing the first post, so it shouldn't be a firewall problem.
Last.fm actually works, I can for example Right Click -> Last.FM -> Last.FM Love Track ... in foobar and it works, and if I type 195.24.233.55 in IE it also redirects to last.fm without problems, so it souldn't be a dns problem either.

I think it may be a problem with https because https://www.last.fm/ shows exactly the same error page in IE. On the other hand, https://google.com/ doesn't show me that error.

Well anyways, it seems to be my problem and not a problem of your script, so it probably would be better not to discuss it here.

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

Reply #1137
i'd have a look at the proxy settings in the internet explorer options then??

the last.fm command you're using on the context menu is provided by foo_softplaylists and that probably uses the foobar network settings found in the main preferences.

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

Reply #1138
Nope, proxy setting are fine and empty.
I actually asked around other people from all around the world to try and 4 of 4 guys coudn't open https://ws.audioscrobbler.com/2.0/ .
http://SSMaker.ru/1a606b11/ one of them even made a screenshot.

So it seems to be a last.fm issue in the end, isn't it?

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

Reply #1139
i just realised that page is not good to test with. it works on the connection i was using earlier but now i'm somewhere else, i get the same 400 bad request error - however, my last.fm script is still working here.

stick this in a fresh panel and it should open a proper page on the webservices using https.

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

var p = new panel("test");
var l = new lastfm();
var artist = "Katy Perry";

p.run("iexplore https://ws.audioscrobbler.com/2.0/?api_key=" + l.api_key + "&method=artist.getSimilar&artist=" + encodeURIComponent(artist));

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

Reply #1140
It opens IE with the same goddamn error. However if I copy the same link to Firefox it gives me a proper XML response.

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

Reply #1141
i just noticed you mentioned the "Update script" feature not working either. that actually fetches this file over https as well. i bet it works in firefox but not IE.

https://dl.dropboxusercontent.com/u/2280132...2003/common8.js

it looks like you have https issues i can't help you with.

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

Reply #1142
Yep, it works in FF but not in IE. Strange thing is that all the other people I asked had the same stupid https issues.

Well, thanks for trying anyways. I'll let you people know if I get it fixed.

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

Reply #1143
Me again! It seems I got it to work!

First I added https://ws.audioscrobbler.com/ and https://dl.dropboxusercontent.com/ to IE white-list. It seems it did nothing.
Next I turned on TLS 1.0 in Advanced IE settings. It seems it did nothing.
Lastly I checked my PC's local time and it seemed to be a couple of seconds in the future! I ran NTP sync and voila now your script works! I could enter my password and auth with last.fm successfully! Loving/unloving tracks works too and playcounts are now updatet as they should.

However if I uncheck TLS 1.0 or remove ws.audioscrobbler from white-list it doesn't work anymore even if the time is right.

And if I try to "Update script" via context-menu I now get this: Last.fm Playcount Sync: HTTP error: -2146869244 . Well, whatever, at least everything else seems to work.

One more thing I wanted to ask. The Heart-pic is now way too large and is cut in half. In the old version I used I remember there was an option to change the image, or the image size, i can't remember the exact wording. But now even if I replace this big image with the old one it's upscaled. is there a way to make it smaller?


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

Reply #1144
read the text at the start of the panel??

Code: [Select]
//function takes 3 values: x, y, size. see on_size function if you want to update these relative to panel width/height
var ps = new playcount_sync(3, 0, 32);

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

Reply #1145
read the text at the start of the panel??

Code: [Select]
//function takes 3 values: x, y, size. see on_size function if you want to update these relative to panel width/height
var ps = new playcount_sync(3, 0, 32);



Sorry, didn't read the script, thought it would be changeable via context-menu. Many thanks for your support, you're awesome.

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

Reply #1146
i hope you figured out how to get rid of that white background in your screenshot. you can use the menu for that.

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

Reply #1147
Yep, I saw the setting, but prefer it that way though. Thanks.

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

Reply #1148
Damn it, it doesn't work!!!

Quote
Last.fm Playcount Sync: Playcount: completed page 180 of 180
Last.fm Playcount Sync: There were no errors reported.

Using %lastfm_playcount_db% to display it on JSPlaylist... get mostly ? and then sometimes one track shows amount, but pretty much almost none of them do...

More info:
+ I pressed Update Script and got "Download succesful. Restart foobar now?" even though I just installed it again with the latest version (and again, no blue command prompt appeared??? I removed the following files to reinstall: marc2003 folder, foo_customdb.dll, WSH data folder, WSH settings folder.
+ Loving a track still works.
+ I tried field mapping to %artist% and %album artist%
+ Console displays fine alll the way through [/s]

I have two Foobar folders (one is a backup, as I'm always changing stuff and messing it up) and on the backup one I tried to fetch playcounts one more time just to see if it worked there for some magical reason even though it's the same install and when the console finishes reporting I get the blue command prompt asking to close foobar!!! And now it works!!! So my guess is, I mistakenly updated the panel on the backup instead of my regular foobar and that's why it didn't get fixed with the reinstall... have no idea what caused it though.

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

Reply #1149
with 2 installs, you can copy the file named customdb_sqlite.db from folder to folder (while foobar is closed). obviously only one of them will get updated as you listen so it's up to you to keep them in sync.