Skip to main content

Topic: HOW TO: synchronise your last.fm playback stats with foobar (Read 269839 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Sparanoid
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #100
Happy to say that I just integrated this script to my lastest foobar2000 skin, I hope you like it:

http://junior-spirit.deviantart.com/art/Mo...st-fm-151086022
  • Last Edit: 20 January, 2010, 04:08:06 AM by Sparanoid

  • carmenm
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #101
Happy to say that I just integrated this script to my lastest foobar2000 skin, I hope you like it:

http://junior-spirit.deviantart.com/art/Mo...st-fm-151086022

Very very nice. How do you get a window without titlebar?

  • Sparanoid
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #102
Very very nice. How do you get a window without titlebar?

Oh not really, I just crop it in my Photoshop...
  • Last Edit: 20 January, 2010, 05:38:18 AM by Sparanoid

  • carmenm
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #103
Very very nice. How do you get a window without titlebar?

Oh not really, I just crop it in my Photoshop...

Ok

I really like your config. If you dont mind i might still a few ideas

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #104
Awesome! I cant say how much i like this!
thanks so much for developing this!

i have a request: could you guys make it that after i play a track for the first time, the lastfm playcount gets +1 after i stopped listening to this?
what happens now is that i listen to a track for the first time and then the next track starts but the playcount does not get updated.

i.e.

i listen to a track (playcount on last.fm is 0)
script syncs lastfm playcount after 10 secs -> gets 0 because i never listened to that track so tag in custom db stays empty
opening next track artist - track 2
[it would be nice if you let the script take lastfm_playcount and add 1 to it here]

that way i can see which music i listened and which i did not listen!
would be so awesome!

i cant code javascript and i'm busy but i dont think its that hard to make if you made such a brilliant script
thanks again to the developers!

  • carmenm
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #105
Awesome! I cant say how much i like this!
thanks so much for developing this!

i have a request: could you guys make it that after i play a track for the first time, the lastfm playcount gets +1 after i stopped listening to this?
what happens now is that i listen to a track for the first time and then the next track starts but the playcount does not get updated.

i.e.

i listen to a track (playcount on last.fm is 0)
script syncs lastfm playcount after 10 secs -> gets 0 because i never listened to that track so tag in custom db stays empty
opening next track artist - track 2
[it would be nice if you let the script take lastfm_playcount and add 1 to it here]

that way i can see which music i listened and which i did not listen!
would be so awesome!

i cant code javascript and i'm busy but i dont think its that hard to make if you made such a brilliant script
thanks again to the developers!


I dont that would be the solution. And i am thinking about something. WE use lastfm playcount, but maybe that s not the real playcount. Maybe the playcount should be the max of the lastfm playcount and the statistics component playcount. I think i will go with something like that

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #106
i'll add an option for auto correction (add 1 to last.fm repsonse).

i really need to update this for use with DUI such as setting background colours and whatnot.

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #107
Quote
I dont that would be the solution. And i am thinking about something. WE use lastfm playcount, but maybe that s not the real playcount. Maybe the playcount should be the max of the lastfm playcount and the statistics component playcount. I think i will go with something like that


hm i was hoping that i could remove the playcount statistics component.

hah i think i actually managed to do it
i'll test it hang on if it works i'll post it here in a sec!

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #108
here they are my first lines of JS

i just added after the custom db == 1 because i use it, but i think adding it before its being added to your tags should do the trick!

Code: [Select]
var newplaycount = (userplaycount * 1)+1; 
var userplaycount = newplaycount.toString();
  • Last Edit: 20 January, 2010, 10:04:42 AM by MB.

  • carmenm
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #109
here they are my first lines of JS

i just added after the custom db == 1 because i use it, but i think adding it before its being added to your tags should do the trick!

Code: [Select]
var newplaycount = (userplaycount * 1)+1; 
var userplaycount = newplaycount.toString();

that s a solution or maybe we should modify the statistics playcount if lastfm count is superior!
I ll look into it

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #110
Awesome! I cant say how much i like this!
thanks so much for developing this!

i have a request: could you guys make it that after i play a track for the first time, the lastfm playcount gets +1 after i stopped listening to this?
what happens now is that i listen to a track for the first time and then the next track starts but the playcount does not get updated.

i.e.

i listen to a track (playcount on last.fm is 0)
script syncs lastfm playcount after 10 secs -> gets 0 because i never listened to that track so tag in custom db stays empty
opening next track artist - track 2
[it would be nice if you let the script take lastfm_playcount and add 1 to it here]

that way i can see which music i listened and which i did not listen!
would be so awesome!

i cant code javascript and i'm busy but i dont think its that hard to make if you made such a brilliant script
thanks again to the developers!


I dont that would be the solution. And i am thinking about something. WE use lastfm playcount, but maybe that s not the real playcount. Maybe the playcount should be the max of the lastfm playcount and the statistics component playcount. I think i will go with something like that



here they are my first lines of JS

i just added after the custom db == 1 because i use it, but i think adding it before its being added to your tags should do the trick!

Code: [Select]
var newplaycount = (userplaycount * 1)+1; 
var userplaycount = newplaycount.toString();

that s a solution or maybe we should modify the statistics playcount if lastfm count is superior!
I ll look into it


i think i dont need playcount statistics anymore
i always used that db so now i can use the custom db with last fm playcount stats!

time to build a new DUI theme
WSH panel + foobar 1 gave sooo much new cool options!

  • carmenm
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #111
here they are my first lines of JS

i just added after the custom db == 1 because i use it, but i think adding it before its being added to your tags should do the trick!

Code: [Select]
var newplaycount = (userplaycount * 1)+1; 
var userplaycount = newplaycount.toString();

that s a solution or maybe we should modify the statistics playcount if lastfm count is superior!
I ll look into it


i think i dont need playcount statistics anymore
i always used that db so now i can use the custom db with last fm playcount stats!

time to build a new DUI theme
WSH panel + foobar 1 gave sooo much new cool options!

But what if you play music while not having the net. You have lost playcounts. I dont want that

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #112
foo_audioscrobbler saves them in your cache, next time you play a track it'll be updated.

but then we need a function that syncs playcount stats with tracks that were played when disconnected


too bad last fm doesnt allow us to download all stats at once

  • HiRsch
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #113
hi,
i'm usin foobar 1.0 and DUI, but can't manage to get the WSH panel into the toolbar, as seen on your screenshot. can anyone help?
very sweet tool btw!
cheers bro

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #114
hm i have another question:
my foobar hangs after 10 seconds of playtime (its checking/syncing with last.fm)
but it takes around ~40 seconds! is that normal?

maybe its because i have a very big library or a big number of scrobbled tracks? (it cant be my pc)
ow  add me to last.fm if you like: http://www.last.fm/user/silk-nl
  • Last Edit: 20 January, 2010, 10:57:35 AM by MB.

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #115
hi,
i'm usin foobar 1.0 and DUI, but can't manage to get the WSH panel into the toolbar, as seen on your screenshot. can anyone help?
very sweet tool btw!
cheers bro


enable layout editing mode>right click your buttons and choose customize>add a new button with the function to love last.fm track (foo_softplaylists)
that should work!

edit: problem with this method is that your track will be loved the next time you play it, not directly!
maybe someone has a better idea
  • Last Edit: 20 January, 2010, 11:14:38 AM by MB.

  • carmenm
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #116
hm i have another question:
my foobar hangs after 10 seconds of playtime (its checking/syncing with last.fm)
but it takes around ~40 seconds! is that normal?

maybe its because i have a very big library or a big number of scrobbled tracks? (it cant be my pc)
ow  add me to last.fm if you like: http://www.last.fm/user/silk-nl

It has nothing to do with the number of tracks in your library (or it would take ages here ). I would say it s problem with your internet connection. You should see logs of lastfm in the console. What is the last one you see when it starts hanging?

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #117
Playcount sync: Contacting Last.fm....
[HANG for 40 secs]
Status: OK

my library is around 750GB
and i have over 45k scrobbles.

maybe it is my internet its not that fast :S

  • carmenm
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #118
Playcount sync: Contacting Last.fm....
[HANG for 40 secs]
Status: OK

my library is around 750GB
and i have over 45k scrobbles.

maybe it is my internet its not that fast :S

As i said it has nothing to do with your library, whatever the size or scrobbled score.
From what you tell me it takes you a really long time to contact lastfm.
can you tell me if it takes overtime to open that page
http://ws.audioscrobbler.com/2.0/?method=a...ac220b7b2e0a026

  • MB.
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #119
Playcount sync: Contacting Last.fm....
[HANG for 40 secs]
Status: OK

my library is around 750GB
and i have over 45k scrobbles.

maybe it is my internet its not that fast :S

As i said it has nothing to do with your library, whatever the size or scrobbled score.
From what you tell me it takes you a really long time to contact lastfm.
can you tell me if it takes overtime to open that page
http://ws.audioscrobbler.com/2.0/?method=a...ac220b7b2e0a026


that page is loaded in a sec so nope thats not it...
i'm on 4mbit/.5mbit

  • carmenm
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #120
Playcount sync: Contacting Last.fm....
[HANG for 40 secs]
Status: OK

my library is around 750GB
and i have over 45k scrobbles.

maybe it is my internet its not that fast :S

As i said it has nothing to do with your library, whatever the size or scrobbled score.
From what you tell me it takes you a really long time to contact lastfm.
can you tell me if it takes overtime to open that page
http://ws.audioscrobbler.com/2.0/?method=a...ac220b7b2e0a026


that page is loaded in a sec so nope thats not it...
i'm on 4mbit/.5mbit

strange

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #121
New version uploaded

changes:

bundled required components into zip
defaults to using foo_customdb
requires foobar v1 as it uses latest WSH panel mod (now with native DUI support)
context menu for setting panel background colour
Quote
“None” is for CUI users who have the “Pseudo transparent” option enabled.
“Default” follows the DUI/CUI background colours. The panel will update itself if you change scheme.
“Splitter” does what it says on the tin.
“Custom” is an RGB value you can set in the script.



HOW TO: synchronise your last.fm playback stats with foobar
Reply #122
Thanks for the update, it's running well.

One thing, though.  The following line is present in the on_paint() function:

Code: [Select]
if(dui) gr.DrawRect(0,0, ww, wh, 1.0, RGB(160,160,160));


It adds a faux-border effect to the button.  Wouldn't it be better to control the edge style using the WSH Panel Mod editor instead of a hard-coded command?

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #123
you're right. i thought last time i checked, it didn't look right. but the "grey" effect looks exactly the same now. i'll remove that line.

  • puserp
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #124
First of all I want to thank marc2003, for this script. It is very helpful to me.
Second of all I think there is a problem that i can not solve.
1. foo_customdb.dll.cfg config has a mistake in action "Set value" for "CustomdbTH 9". It should be 9, but now it is "CustomdbTH 9".
2. for playcount i use string from readme.pdf

Code: [Select]
$max([%LFM_TH%][%LFM_H%][%LFM_T%][%LFM_U%],[%play_count_cd%])


For some strange reason it shows 355 instead of 35. All other number(so far ?) are shown correctly.
Any explanations of this behavior ?

update:

LFT_T shows 3
LFM_U shows 55

last.fm website shows stats correctly

Is error in parsing part of the script ?

update2: I don't know if it is important, but track with playcount value 355 have rating value 5. Now i am trying to see if 355 playcount will appear on track without rating tag.
  • Last Edit: 22 January, 2010, 06:01:24 AM by puserp