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 385100 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 #650
Marc,

Firstly I'd like to thank you for this great script -- simply amazing. I just have one question...

Currently, the script treats any track with the same "Artist" and "Song Title" as the same.

Lets say I have two tracks -- same artist, same title, but from different albums (i.e. one is a studio version, one is a live version).

If I listen to just ONE of the two tracks, the script's playcount feature will affect both tracks since they both have the same artist and title -- i.e., if I listen to the studio version, the live version also is credited as having been listened to.

So, in my ELPlaylist, after listening to ONE of the two tracks, both tracks are credited with the playcount.

Is there any way to prevent this? Perhaps have the script be aware of album titles in addition to artist and song title?

The way the script functions now creates a bit of "playcount inflation" on my ELPlaylist, especially since I have many live albums.

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

Reply #651
sorry but there isn't anything i can do about that. when i fetch the track info from last.fm, it only allows me to supply the artist and title as parameters and not the album.

for the most part, last.fm also aggregates these artist/title play counts when browsing the track pages online. it's only if you dig deep into your "Library" that it will show play counts per album. there doesn't appear to be anyway for me to access this information.

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

Reply #652
Completed page 131 of 170 (playcount)
Error: WSH Panel Mod (Playcount Sync by marc2003): Microsoft JScript runtime error:
'parsed_data.tracks.track' is null or not an object
Ln: 241, Col: 15
<source text only available at compile time>

o.o

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

Reply #653
I got this error doing the import library (sorry my bad english)

Code: [Select]
Error: WSH Panel Mod (Sync playcount by marc2003): Runtime Error in Microsoft JScript:
Exception thrown away and not detected
Ln: 1, Col: 3395
<source text only available at compile time>


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

Reply #655
Is there anyway to implement a blacklist feature so that tracks by a particular artist or which contain a certain TAG are not scrobbled/synced. I presume this feature would have to be implemented outside of the script?

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

Reply #656
you need to configure foo_audioscrobbler for what gets scrobbled. it can be set to only scrobble tracks that are in your library. or you could mess about with the field remapping. if the artist field is blank, it won't get submitted.

eg, this wouldn't submit if the genre was jazz....
Code: [Select]
$if($stricmp(%genre%,jazz),,[%artist%])




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

Reply #658
you need to configure foo_audioscrobbler for what gets scrobbled. it can be set to only scrobble tracks that are in your library. or you could mess about with the field remapping. if the artist field is blank, it won't get submitted.

eg, this wouldn't submit if the genre was jazz....
Code: [Select]
$if($stricmp(%genre%,jazz),,[%artist%])


Cheers, I'll take a look into this.

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

Reply #659
Still getting the "'parsed_data.tracks.track' is null or not an object" error.


this should never happen during an import now. did you definitely import the new .txt file into your panel. that's all you had to do - nothing else changed. also can you can share your last.fm userid with me. PM will do if you don't want to post it here. i don't need your api key.

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

Reply #660
Still getting the "'parsed_data.tracks.track' is null or not an object" error.


this should never happen during an import now. did you definitely import the new .txt file into your panel. that's all you had to do - nothing else changed. also can you can share your last.fm userid with me. PM will do if you don't want to post it here. i don't need your api key.


Interesting, yes I definitely did import it, then did it again to make sure.

My last.fm id is bloodclox

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

Reply #661
when i check each record i use a try...catch statement. this means it should never crash now. if it encounters an error, it should simply continue but the record it got stuck on will be missed from the final results. at the end it should output have many errors were found in the console because i count each one.

if there is a more serious error where a whole page fails, then it aborts processing altogether and spawns a popup window indicating that you should try again later along with the full error. and this is what happened to me just now testing your account. i only got to 15 pages before this happened.

Quote
There is a problem with the Last.fm web services. Please try again later.

{"error":8,"message":null}


i tried again and got the same error on page 105. so there's obviously no error on page 15 like the first attempt seemed to indicate. it's just last.fm being flaky at the moment and there is nothing i can do about that.

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

Reply #662
when i check each record i use a try...catch statement. this means it should never crash now. if it encounters an error, it should simply continue but the record it got stuck on will be missed from the final results. at the end it should output have many errors were found in the console because i count each one.

if there is a more serious error where a whole page fails, then it aborts processing altogether and spawns a popup window indicating that you should try again later along with the full error. and this is what happened to me just now testing your account. i only got to 15 pages before this happened.

Quote
There is a problem with the Last.fm web services. Please try again later.

{"error":8,"message":null}


i tried again and got the same error on page 105. so there's obviously no error on page 15 like the first attempt seemed to indicate. it's just last.fm being flaky at the moment and there is nothing i can do about that.


If it helps, Page 132 of 171 is the last page that can complete before i get the 'parsed_data.tracks.track'. It fails at that point every time. (two weeks ago it was page 131). I've been trying every day since Sep 4 2011 but always get that error.

Thanks for your help, i really appreciate it.


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

Reply #664
WORKS! Thank you so much  I really appreciate all you have done and thanks for creating the script and tutorial

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

Reply #665
Hello,
I've been getting an abnormal termination for the last month. I've just run through the majority of my other plugins, and surprisingly it isn't WSH doing the crashing. I can't find the culprit though. If I launch in safe mode the next start-up is successful. The "running" file in the foobar folder remains there when I close the program. Just wondering your script might be doing it.
Thanks,

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

Reply #666
i think it's highly unlikely. you usually know about it when it craps out.

the easy way to test is to simply remove the script for a day or 2. leave the panel in place but blank and leave the other components as they are too.

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

Reply #667
a little update which does a better job of reporting errors. http://dl.dropbox.com/u/22801321/playcount%20sync.zip

even though i fixed the problems bloodclot was having a few days ago, it still reported 0 errors which is wrong. it now says this in the console when importing is complete.

Code: [Select]
Loved track page errors: 0 (200 records are lost for every page that fails.) 
Playcount page errors: 3 (100 records are lost for every page that fails.)
Individual errors: 0


there is nothing i can do about these errors because upon further checking, last.fm is actually returning this as the content for the problematic pages.

Code: [Select]
""

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

Reply #668
i'm not sure if this has been addressed but it's not updating the loved status of tracks for me. i can love a track but the heart icon doesn't show up in foobar unless i right click and go to Legacy Commands > Customdb love 1. i was under the impression that it would do this automatically

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

Reply #669
have you checked the foobar console to make sure foo_softplaylists is working as it should? that will display success/failure messages when you love a track. although the script itself doesn't report success/failure when fetching love tracked status, it's always worked every time for me and no one else has reported this issue.

BTW, for people who are interested, the next version of WSH panel mod will allow this script to run with the Last.fm and Legacy commands (unsorted) menu items hidden. i'll update the script when the component gets properly released.

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

Reply #670
script now requires WSH panel mod 1.5.0 beta3 or above.

http://dl.dropbox.com/u/22801321/playcount%20sync.zip

you can now hide the Last.fm and Legacy Commands (unsorted) sub-menus under file>preferences>display>context menu without breaking the script.

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

Reply #671

I am continually receiving this error in console: Playcount Sync: HTTP error: 12029

I dont think it's managed to update in the last few weeks because of this. All of my components are fully up to date.

Any ideas?

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

Reply #672
My audioscrobbler works fine, btw. It doesn't receive any errors, just playcount.

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

Reply #673
the script is working exactly as expected by writing that message to the console so there isn't much else i can do.

i just googled that error and it looks to be an issue between your machine and last.fm??

Code: [Select]
12029       ERROR_INTERNET_CANNOT_CONNECT
               The attempt to connect to the server failed.


all i can suggest is clearing all your Internet Explorer temporary files and try again?? i assume all other internet stuff is working fine? do you have another pc you can test from using the same internet connection? as you can see, i'm clutching at straws here. i really have no idea.

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

Reply #674
the script is working exactly as expected by writing that message to the console so there isn't much else i can do.

i just googled that error and it looks to be an issue between your machine and last.fm??

Code: [Select]
12029       ERROR_INTERNET_CANNOT_CONNECT
               The attempt to connect to the server failed.


all i can suggest is clearing all your Internet Explorer temporary files and try again?? i assume all other internet stuff is working fine? do you have another pc you can test from using the same internet connection? as you can see, i'm clutching at straws here. i really have no idea.


Looks like Internet Explorer had it's Proxy settings changed even though I've never opened it on this computer. I set it to automatically detect settings and it's working fine.

I didn't think to even check IE...

Thanks!