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 380976 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 #75
How can i prevent this script from trying to submit information from streams?

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

Reply #76
the reasons it still runs for streams are...

-you can store loved status/playcounts if using customdb mode
-even if not using custom db, you can still love streams and get a graphical representation of that because the button turns red if it is. also, it doesn't try and tag streams because there are checks in place to prevent this....

i suppose it's possible to prevent it checking but it's hardly worth the effort. one little web request per listened to track/stream really shouldn't really matter???

edit: if you really want to stop it, find and replace this function in the script...

Code: [Select]
function on_playback_time(time) {
    if(t.eval() == 10 && file_is_valid) {
        if(old_userloved != 1 && auto_love == 1 && auto_love_condition.eval() == 1) {
            fb.trace("Playcount sync: Auto-love is on. Triggering soft_playlists....");
            fb.RunContextCommand(love_command);
        }
        sync();
    }
}

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

Reply #77
hi,

please, how i can set the tracks with any rating(0,1,2,3,4,5) to be loved ?

was thinking about make a playlist with all songs I want to be loved.

thanks for share the script

 

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

Reply #78
Quote
rating(0,1,2,3,4,5)


you want it to automatically love ALL tracks as they are played? 

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

Reply #79
Quote
rating(0,1,2,3,4,5)


you want it to automatically love ALL tracks as they are played? 


yes, then... I dont need to always click to love a track who does have rating loewr than 5 or doesn't have any rating.

plus I could just throw to the playlist the tracks that I want to be loved (without have to rate them).

for just play any playlist normally, I can always turn the auto love off.

I use Quick Tagger for rating, and hit properties and set the rating one by one for diferent rating is a bit annoying.

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

Reply #80
well it is already documented what you need to do...

Code: [Select]
//automatically love tracks based on titleformatting below. turned off by default. set to 1 to enable.
var auto_love = 0;
//basic example of title formatting to use. this will automatically "love" all tracks with a rating of 5
//of course you can use anything you like. result must be 1 in conjunction with the above option
//being set for it to trigger
var auto_love_condition = fb.TitleFormat("$ifequal(%rating%,5,1,0)");


but in your case you can remove the "fb.TitleFormat" bit altogether.

Code: [Select]
var auto_love_condition = 1;

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

Reply #81
working fine now, thanks!   

i needed to change this line too:
Code: [Select]
if(old_userloved != 1 && auto_love == 1 && auto_love_condition.eval() == 1) {

to:
Code: [Select]
if(old_userloved != 1 && auto_love == 1 ) {

because of that error:

[00:49:43] Error: WSH Panel Mod (GUID: 78F958F8-3A87-4511-AEB9-3066E3C6136E): Microsoft JScript runtime error:
Object doesn't support this property or method
Ln: 104, Col: 3
<no source text available>

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

Reply #82
sorry about that. at least you figured it out. 

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

Reply #83
T.P Wang has made a new version of WSH panel mod that runs natively in DUI without dockable panels. check it out.

http://code.google.com/p/foo-wsh-panel-mod/downloads/list

huge thanks to T.P for that.

(could a passing mod edit the first post to reflect this. thanks.)


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

Reply #84
Hi marc,

Again I come with a suggestion that may not be possible--but here goes anyway: could the system check for auto-adjusted names? In most cases this points to a bad tag, but for example I have albums of "MOSAIC.WAV", and that name doesn't scrobble properly due to a bug in last.fm's code (that has been there for YEARS). As a workaround, the tag on my files is "MOSAIC. WAV", but now the tag updater doesn't work properly, since it's an auto-adjusted name.

In other cases it might be due to romanised name (for example I had files with Koji Kondo as tag, instead of 近藤浩治 which is harder to search for...).

So if it's at all possible, I'd really like this option!

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

Reply #85
i'm kind of lost for words.....what exactly can i do about that? 

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

Reply #86
I had some problem updating to the new WSH Panel Mod.

It works now, not sure if it's a bug.

The paths for the scripts are wrong, there's no \ char.

Original:
Code: [Select]
$(dir.component)jscript.api;$(dir.component)interface.api

Edited:
Code: [Select]
$(dir.component)\jscript.api;$(dir.component)\interface.api
Windows 10 Pro x64 // foobar2000 1.3.10

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

Reply #87
i'm kind of lost for words.....what exactly can i do about that? 

Ah I guess I didn't explain that part... I was thinking, maybe you could check if last.fm did its "changed your tags for you" thing, and then get the playcount from the resulting tag instead? I dunno if you actually can do that though.

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

Reply #88
i take the artist and title and try and directly access a file on the last.fm servers. it either exists or it doesn't. that is all. there is no response saying "aw... did you mean this? "

it sucks that last.fm don't tag all music as it should be, but there's very little you can do about it.

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

Reply #89
I had some problem updating to the new WSH Panel Mod.


there's nothing wrong with how it was. those files are to provide auto-complete in the editor and it works fine without the changes you've made.

the latest change in WSH panel mod that does affect this script is that "safe mode" is enabled by default. anybody upgrading will need to disable it. for anybody who doesn't know, this is set under the main foobar preferences>tools>WSH panel mod.

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

Reply #90
Yeah... I kinda expected that, but I figured there was no harm in asking. Since the actual website does say "did you mean this?" there was a small chance their web interface does too...

It's kind of an annoying bug since I hate not having the correct tag, the fact that a major artist is simply not supported by their scrobbler (but it IS supported in last.fm, since there's a page for it), it is a bit crazy. At least submitting with "incorrect" tags allows me to actually scrobble my plays (of course I discovered this after I played the mosaic.wav tracks dozens of times already...). Anyway, thanks for explaining

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

Reply #91
I had the same problem as スラッシュ with the renaming of some tracks.  If you go into your Last.fm's preferences you can disable the renaming option.

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

Reply #92
I had some problem updating to the new WSH Panel Mod.


there's nothing wrong with how it was. those files are to provide auto-complete in the editor and it works fine without the changes you've made.

the latest change in WSH panel mod that does affect this script is that "safe mode" is enabled by default. anybody upgrading will need to disable it. for anybody who doesn't know, this is set under the main foobar preferences>tools>WSH panel mod.

I tried disable it first, maybe had to restart foobar2000 or the playback.

It works either way, thanks.
Windows 10 Pro x64 // foobar2000 1.3.10

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

Reply #93
I got an error when updated to wsh panel mod beta 4:

Code: [Select]
Scripting Engine Initialization Failed (GUID: 5C5DECD1-A7FA-4977-87D2-EA1863009B43, CODE: 0x80020101)
Check the console for more detailed information (Always caused by unexcepted script error).


console:

Code: [Select]
WSH Panel Mod (GUID: 5C5DECD1-A7FA-4977-87D2-EA1863009B43): Parsing file "D:\Program Files (x86)\foobar2000\scripts\tooltip_buttons.js": Failed to load
Error: WSH Panel Mod (GUID: 5C5DECD1-A7FA-4977-87D2-EA1863009B43): Microsoft JScript runtime error:
Automation server can't create object
Ln: 38, Col: 1
<no source text available>

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

Reply #94
the latest change in WSH panel mod that does affect this script is that "safe mode" is enabled by default. anybody upgrading will need to disable it. for anybody who doesn't know, this is set under the main foobar preferences>tools>WSH panel mod.


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

Reply #95
Thanks a lot I get it works, now I'm working on integrating this script to my new theme, things getting on well but have a problem: I'm trying to display the playcount %LFM_TH%%LFM_H%%LFM_T%%LFM_U% with customdb enabled but got playcount like these: ???3, ??23, ?876.

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

Reply #96
if you check the readme file again, you'll see they have [] around them to prevent that.

Code: [Select]
[%LFM_TH%][%LFM_H%][%LFM_T%][%LFM_U%]

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

Reply #97
Oh, that works! I'm not very good at coding  , Thanks!

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

Reply #98
Well this may be a bug: when I enable Spelling Correction on last.fm website this script can't get the playcount.

Such as: When the japanese pop singer Itou Kanako automatically corrected to いとうかなこ, the script didn't work

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

Reply #99
if last.fm is wrong, you can turn off spelling correction in the options.

http://www.last.fm/settings/website

there's nothing my script can do about this. from just a few posts up.....

i take the artist and title and try and directly access a file on the last.fm servers. it either exists or it doesn't. that is all.



EDIT:
could a kind moderator please make the following changes to the opening post.

-file tagging is no longer compulsory. it works with foo_customdb which means you can store stats for anything without touching your files.
-in the 2nd list item, change the time period from 60 to 10 seconds.
-remove the 3rd list item altogether

thanks.