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 389165 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

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

Reply #626
dfghdzfhgzjgjdfhgjgfkzjdjfgzdjkgnzbncb

that's about how much sense that error means to me. 

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

Reply #627
sorry, im brazilian and i translate the erro

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

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

Reply #628
well i don't think i have any idea how to fix that.  does that happen when you close the editor dialog or when doing something particular? if it happens during an import can you tell me your last.fm userid so i can test it?

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

Reply #629
i send my user id and api key in MP

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

Reply #630
i didn't need the API key. still, that doesn't matter.

i just imported your entire library without any problems. i then tried again and it prompted me with an error (a server error that i scripted it to catch). it looks like last.fm still hasn't recovered properly from the downtime at the weekend. all i can suggest is trying again later/tomorrow.

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

-under the hood stuff that aborts importing if last.fm credentials are changed from another script. (they all share credentials and notify each other when changed)

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

Reply #631
Completed page 45 of 45 (playcount)

ty marc

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

Reply #632
This happens, when i click on "Create and import SQL file":
Quote
Error: WSH Panel Mod (Playcount Sync by marc2003): runtime error in Microsoft JScript:
'parsed_data.lovedtracks.@attr.totalPages' is Null or not an object
Ln: 185, Col: 16
<source text only available at compile time>
Could it be a problem if i dont have loved tracks and also don't want to use them?

edit:
yes it is a problem. i *loved* on song and now it works. but to be true, i don't want to love tracks.


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

Reply #634
thank you, now it works without loved tracks. is there any other side effect than the error exclamation mark in the wsh panel if i delete the foo_softplaylists? as i understand your description, i only need it, if i am interested in the loved tracks feature?!

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

Reply #635
no side effects - automatic playcount updates and library importing still work without foo_softplaylists. you can always resize the panel so you can't see the button (right click>background>splitter so it blends in).

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

Reply #636
aha, thanks. i guess the suggested configuration suites my needs. well done!

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

Reply #637
I have imported your script and it's working great. Have just one small issue with same title songs in elplaylist. Tried it in several skins, same problem.

So, this is what happens:

[a href="http://imageshack.us/photo/my-images/84/foobarplaycount.jpg/" target="_blank"]

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

Reply #638
line 172 should be...

Code: [Select]
fb.RunContextCommandWithMetadb("Customdb Refresh", g_metadb);


add this on a new line directly after it

Code: [Select]
fb.RunMainMenuCommand("ELPlaylist/Refresh");



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

Reply #639
Thank you, its working now

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

Reply #640
I try to add your integration on br3tt's new skin Hifoo, but i can't manage to make the count appear, what should i edit to see the numbers?

thanks ahead.

 

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

Reply #641
well i'm not picking apart other people's themes but i guess it's using ELPlaylist. just right click the playlist>settings and check either the script>track list tab or maybe field definition tab. look for anything play count related and replace it with

Code: [Select]
%LASTFM_PLAYCOUNT_DB%

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

Reply #642
thanks but im very bad with this, here's the code to the play count in playlist, i would thank you a lot if you can explain where should i put this.

Code: [Select]
// play_counter exposant
$if($stricmp(%el_preset_name%,'album (no header)'),
  $ifgreater($add($get(artist_txt_width),$get(title_txt_width)),%_title_w%,
$puts(area_w,%_title_w%)
  ,
$puts(area_w,$add($get(artist_txt_width),$get(title_txt_width)))
  )
  $font(uni 05_53,6,)
  $ifgreater(%__playcount%,0,
$drawtextex(%__playcount%,$add(%_pad_x%,%_tracknumber_w%,-11,$get(area_w)),0,$add($get(title_txt_width),0),%el_height%,$if(%el_isplaying%,220-50-50,80-90-100),left vtop)
  ,)
,
  $ifgreater($get(title_txt_width),%_title_w%,
$puts(area_w,%_title_w%)
  ,
$puts(area_w,$get(title_txt_width))
  )
  $font(uni 05_53,6,)
  $ifgreater(%__playcount%,0,
$drawtextex(%__playcount%,$add(%_pad_x%,%_tracknumber_w%,-11,$get(area_w)),0,$add($get(title_txt_width),0),%el_height%,$if(%el_isplaying%,220-50-50,80-90-100),left vtop)
  ,)
)

and if it's not there, where i should put it, and the 'love' icon?
here's the full script:

Code: [Select]
$puts(cf_name,'hifoo')
$puts(foo_path,%el_foobar2000_path%)
$puts(z1,$get(foo_path)'/skins/'$get(cf_name))
$puts(z2,$get(z1)'/gfx/')
$puts(z3,%ps_user_profile_path%'/skins/'$get(cf_name))

// fonts
$puts(small_font,'uni 05_53')
$puts(small_font_size,6)
$puts(small_font_style,'bold')
$puts(guifx_font,'guifx v2 transports')
$puts(guifx_font_size,11)
$puts(guifx_font_style,'normal')

// stripes
$ifequal($mod(%el_item_index%,2),0,
  $drawrect(0,0,$sub(%ww%,3),%el_height%,250-250-250-6,)
,)

$if($stricmp(%el_preset_name%,'album (no header)'),,
  $ifequal($add(%el_item_index%,1),%el_item_count%,
$drawroundrect(0,-5,$sub(%ww%,3),$sub(%el_height%,-4),2,2,30-40-50-00,15-20-25,)
  ,
$drawroundrect(0,-5,$sub(%ww%,3),$sub(%el_height%,-10),2,2,30-40-50-00,15-20-25,)
  )
)

// tracknumber
$ifgreater(%_tracknumber_w%,0,
$font(segoe ui,8,bold)
$if(%queue_index%,
$font(segoe ui,8,bold)
$drawroundrect($add(%_pad_x%,1),4,30,20,1,1,155-255-155-135,055-115-055-136,)
$drawblurrect($add(%_pad_x%,7),7,20,20,155-255-155-155,4)
$if($or($greater(%mood%,0),$greater(%skip%,0)),,
$drawtextex($ifgreater($len(%queue_index%),1,,0)%queue_index%,%_pad_x%,7,33,%el_height%,020-90-020-200,hcenter vtop end_ellipsis)
)
,
$if(%el_isplaying%,
,
$if($or(%el_selected%,%el_focused%),
$drawroundrect($add(%_pad_x%,1),4,30,20,1,1,150-160-170-65,150-160-170-66,)
$if($or($greater(%mood%,0),$greater(%skip%,0)),,
$drawtextex(%__trackindex%,%_pad_x%,7,33,%el_height%,0-0-0-200,hcenter vtop end_ellipsis)
)
,
$drawroundrect($add(%_pad_x%,1),4,30,20,1,1,0-0-0-55,0-0-0-56,)
$if($or($greater(%mood%,0),$greater(%skip%,0)),,
$drawtextex(%__trackindex%,%_pad_x%,7,33,%el_height%,255-255-255,hcenter vtop end_ellipsis)
)
)
)
)
,)

// track title
$puts(playcounter_txt_width,$add($gettextwidth(%__playcount%,uni 05_53,6,),2))
$font(segoe ui,9,normal)
$puts(artist_txt_width,$gettextwidth(%artist% / ))
$puts(title_txt_width,$gettextwidth(%__title%))
$if($stricmp(%el_preset_name%,'album (no header)'),
  $drawtextex(%artist% / %__title%,$add(%_pad_x%,%_tracknumber_w%,2),1,$sub(%_title_w%,1,$get(playcounter_txt_width)),%el_height%,%_artist_colour_%,left vtop end_ellipsis)
  $drawtextex(%__title%,$add(%_pad_x%,%_tracknumber_w%,2,$get(artist_txt_width)),1,$sub(%_title_w%,1,$get(playcounter_txt_width),$get(artist_txt_width)),%el_height%,%_label_colour_%,left vtop end_ellipsis)
,
  $drawtextex(%__title%,$add(%_pad_x%,%_tracknumber_w%,2),1,$sub(%_title_w%,1,$get(playcounter_txt_width)),%el_height%,%_label_colour_%,left vtop end_ellipsis)
)

// tech info
$if(%el_isplaying%,,
  $puts(bitrate,$if($stricmp($left(%codec_profile%,3),'VBR'),%codec_profile%,$if2($if(%__bitrate_dynamic%,$if(%_isplaying%,$select($add($mod(%_time_elapsed_seconds%,2),1),%__bitrate_dynamic%,%__bitrate_dynamic%),%__bitrate_dynamic%),%__bitrate%)'K','N/A')))
  $font(uni 05_53,6,)
  $if($stricmp(%el_preset_name%,'album (no header)'),
$drawtextex(%__album%,$add(%_pad_x%,%_tracknumber_w%,3),16,$sub(%_title_w%,10),%el_height%,$if(%el_isplaying%,215-225-245,%_c03c_%),left vtop end_ellipsis)
  ,
$puts(VA,$if($stricmp(%album artist%,%artist%),0,1))
$drawtextex($ifequal($get(VA),1,$upper(%artist%)' | ',)$upper(%__codec%) $get(bitrate),$add(%_pad_x%,%_tracknumber_w%,3),16,$sub(%_title_w%,10),%el_height%,$if(%el_isplaying%,215-225-245,%_c03c_%),left vtop end_ellipsis)
  )
)

// play_counter exposant
$if($stricmp(%el_preset_name%,'album (no header)'),
  $ifgreater($add($get(artist_txt_width),$get(title_txt_width)),%_title_w%,
$puts(area_w,%_title_w%)
  ,
$puts(area_w,$add($get(artist_txt_width),$get(title_txt_width)))
  )
  $font(uni 05_53,6,)
  $ifgreater(%__playcount%,0,
$drawtextex(%__playcount%,$add(%_pad_x%,%_tracknumber_w%,-11,$get(area_w)),0,$add($get(title_txt_width),0),%el_height%,$if(%el_isplaying%,220-50-50,80-90-100),left vtop)
  ,)
,
  $ifgreater($get(title_txt_width),%_title_w%,
$puts(area_w,%_title_w%)
  ,
$puts(area_w,$get(title_txt_width))
  )
  $font(uni 05_53,6,)
  $ifgreater(%__playcount%,0,
$drawtextex(%__playcount%,$add(%_pad_x%,%_tracknumber_w%,-11,$get(area_w)),0,$add($get(title_txt_width),0),%el_height%,$if(%el_isplaying%,220-50-50,80-90-100),left vtop)
  ,)
)

// rating
$font($get(guifx_font),$get(guifx_font_size),$get(guifx_font_style))
$if(%el_isplaying%,,
$puts(rating_deb,$sub(%ww%,68))
$puts(rating_sp,13)
$puts(rx,$add(-3, $get(rating_deb)))
$puts(ry,20)
$puts(rc_off,0-0-0-250)
$puts(rc_on,%_c03c_%)
$puts(rc_yellow,%_c03c_%)
$drawellipse($add($get(rx),4,$mul(0,$get(rating_sp))),$add($get(ry),1),4,4,$get(rc_off),,)
$drawellipse($add($get(rx),4,$mul(0,$get(rating_sp))),$add($get(ry),0),4,4,$get(rc_on)-200,,)
$drawellipse($add($get(rx),4,$mul(1,$get(rating_sp))),$add($get(ry),1),4,4,$get(rc_off),,)
$drawellipse($add($get(rx),4,$mul(1,$get(rating_sp))),$add($get(ry),0),4,4,$get(rc_on)-200,,)
$drawellipse($add($get(rx),4,$mul(2,$get(rating_sp))),$add($get(ry),1),4,4,$get(rc_off),,)
$drawellipse($add($get(rx),4,$mul(2,$get(rating_sp))),$add($get(ry),0),4,4,$get(rc_on)-200,,)
$drawellipse($add($get(rx),4,$mul(3,$get(rating_sp))),$add($get(ry),1),4,4,$get(rc_off),,)
$drawellipse($add($get(rx),4,$mul(3,$get(rating_sp))),$add($get(ry),0),4,4,$get(rc_on)-200,,)
$drawellipse($add($get(rx),4,$mul(4,$get(rating_sp))),$add($get(ry),1),4,4,$get(rc_off),,)
$drawellipse($add($get(rx),4,$mul(4,$get(rating_sp))),$add($get(ry),0),4,4,$get(rc_on)-200,,)
$drawstring($repeat(b,%__rating%),$sub($get(rx),1),$sub($get(ry),4),75,15,$get(rc_off),left vtop aa)
$drawstring($repeat(b,%__rating%),$sub($get(rx),1),$sub($get(ry),5),75,15,$get(rc_yellow),left vtop aa)
)

// length
$if(%el_isplaying%,,
$puts(total_length,%length%)
$select($sub($len(%length%),3),
$ifgreater(%length_seconds%,59,
$puts(length,'  00:0')
,
$ifgreater(%length_seconds%,9,
$puts(length,'  00:00:')
$puts(total_length,$right(%length%,2))
,
$puts(length,'  00:00:0')
$puts(total_length,$right(%length%,1))
)
)
,
$puts(length,'  00:')
,
,
$puts(length,'  0')
,
$puts(length,'  ')
)
$if(%length%,,
$puts(length,'  00:00:00')
$puts(total_length,)
)
$font(segoe ui,9,)
$drawtextex($get(length),$sub(%ww%,56),1,56,%el_height%,%_c03d_%,left top)
$drawtextex($get(total_length),$sub(%ww%,63),1,55,%el_height%,%_time_colour_%,right top)
)

// Love Track Icon
$ifgreater(%_tracknumber_w%,0,
$if(%el_isplaying%,,
 $ifgreater(%mood%,0,
  $font($get(guifx_font),16,$get(guifx_font_style))
  $drawstring('^',$add(%_pad_x%,5),4,24,%el_height%,0-0-0-160,right top aa nowrap,)
  $font($get(guifx_font),14,$get(guifx_font_style))
  $drawstring('^',$add(%_pad_x%,6),6,22,%el_height%,0-0-0-150,right top aa nowrap,)
  $drawstring('^',$add(%_pad_x%,6),5,22,%el_height%,60-255-60-200,right top aa nowrap,)
 ,
  $ifgreater(%skip%,0,
$font($get(guifx_font),16,$get(guifx_font_style))
$drawstring('%',$add(%_pad_x%,7),5,23,%el_height%,0-0-0-160,right top aa nowrap,)
$font($get(guifx_font),14,$get(guifx_font_style))
$drawstring('%',$add(%_pad_x%,8),7,21,%el_height%,0-0-0-150,right top aa nowrap,)
$drawstring('%',$add(%_pad_x%,8),6,21,%el_height%,250-60-60-200,right top aa nowrap,)
  ,)
 )
)
,)

Thanks again!

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

Reply #643
reading comprehension fail. you posting it here isn't going to make me change my mind.....

well i'm not picking apart other people's themes.....


if you're stuck, ask the person who made it.

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

Reply #644
ok man.
thanks anyway.

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

Reply #645
just had a quick glance, have you not even tried replacing all instances of %__playcount% with %LASTFM_PLAYCOUNT_DB%


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

Reply #647
Can't download the script. After clicking "full instructions here" the only I see is Windows Live login page.
🇺🇦 Glory to Ukraine!


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

Reply #649
This is a great script but I had to uninstall it, as customdb slowed down my foobar2000 start-up significantly (I have 65000 tracks in my library...). I had a lot of fun with it for a week though!