Skip to main content

Topic: HOW TO: synchronise your last.fm playback stats with foobar (Read 269315 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 #950
I have a (naive) question: Is it possible to hide the WSH panel that I have to add to my layout in order to use the script? My setup consists of the DUI without any tabs.

I love this script, but I don't feel the panel with the heart icon fits into my current layout aesthetically. It was a different story while I was still on CUI. Back then, I simply added the WSH panel to the toolbar. The heart icon didn't bother me in the toolbar location.

  • mjm716
  • [*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #951
when you get your download from last.fm, you should extract the json folder somewhere.



Does this method (downloaded json) replace the original, or is this supplemental? e.g. when I import the downloaded data with the script, does it import all fastfm stats or only some such as firstplayed?

I haven't yet sync'd my stats, and would prefer to do it only once from the downloaded dataset.

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #952
Is it possible to hide the WSH panel that I have to add to my layout in order to use the script?


yup. just resize the panel as small as it will go. in this example it's at the bottom between the playlist and status bar. i've changed the background by right clicking>background>splitter.



Does this method (downloaded json) replace the original, or is this supplemental?


that is supplemental and only imports first played and/or last played. that's configured by altering two variables at the start of the script to true or false. it requires files provided by the original script so that must be setup first.

obviously these values will constantly change in the future so it's probably best used in conjunction with foo_playcount. eg

Code: [Select]
$if2(%LAST_PLAYED%,[%LAST_PLAYED_DB%]) //preferable to get last played from foo_playcount
$if2(%FIRST_PLAYED_DB%,[%FIRST_PLAYED%]) //first played would probably be better from last.fm
  • Last Edit: 11 January, 2014, 11:18:26 AM by marc2003

HOW TO: synchronise your last.fm playback stats with foobar
Reply #953
Is it possible to hide the WSH panel
i've changed the background by right clicking>background>splitter.

Thanks! The minimization of the panel works. I can't seem to change the color of the splitter (no option "background" shows in the context menu) but that's fine. Thanks again.
  • Last Edit: 12 January, 2014, 03:13:53 AM by aztec_mystic

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #954
perhaps you're missing the panel when you right click?



you can always make the panel larger again to make it easier.

edit: most of the right click options are only available by right clicking on the heart icon itself so you might want to double check those before hiding it.
  • Last Edit: 12 January, 2014, 04:18:52 AM by marc2003

HOW TO: synchronise your last.fm playback stats with foobar
Reply #955
Got it -- great!

  • ubercow
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #956
hi marc, I'm getting json parse errors in the console for all your last.fm scripts since some time in the last few days..did something change? I might have accidentally done something myself but I'm not sure!

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #957
everything is working fine here and there have been no outages reported on the last.fm status page.

make sure you're running the latest version of my script. right click one of the panels>Update script. if the update fails, you download this file and save it inside your foobar profile\marc2003 folder. do this while foobar is closed. if you get any kind of script errors on startup, the scripts in your panels might be out of date in which case you'll need to import the latest from the full download.

also, you can try opening internet explorer, going in to internet options>browsing history>delete>temporary internet files.

if all this does nothing, try a new panel and import either the musicbrainz or discogs script into it. these scripts also use JSON feeds and it might help determine if the problem is just last.fm related or not.

  • ubercow
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #958
that's weird, I tried the internet explorer thing and it's working now. Not sure if that's what did it. Thanks very much anyway !

  • xska
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #959
I am trying to import via the last.fm data export (aka from file), but the option is greyed out in the menu. How do I activate it?

edit: That is, if such import is possible at all? The reason I'm trying this instead of via webservices is that my library is HUUGE. So it pretty much always fails around after about 100 requests

Last.fm Playcount Sync: Playcount: completed page 119 of 572
And then...
Error screenshot
  • Last Edit: 08 February, 2014, 09:17:13 AM by xska

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #960
the main script from the first post doesn't do anything with the exported data files you have.

i've just modified the recent script i made for parsing the exported files here: https://dl.dropboxusercontent.com/u/2280132...port/export.txt

put it in a new panel and take care to edit the first 3 variables as you like. it's a plain white panel - just double click to run it.

if you're only interested in the playcount, the original .cfg file supplied in my original zip will be fine. if you want to import first played/last played, you'd need to use this updated foo_customdb.dll.cfg file to go in your configuration folder: https://dl.dropboxusercontent.com/u/2280132...ustomdb.dll.cfg

i've not been able to test this as i deleted all my files from last.fm but hopefully it will work.

  • xska
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #961
Awesome! Worked like a charm. Thank you very much

Code: [Select]
It took 3 seconds to open 89 JSON files and read 130500 scrobbles. 
130500 scrobbles took 1 seconds to process.
Last.fm library contains 57535 tracks.

  • Emerelle
  • [*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #962
I have a very weird problem.....while all is working fine with this script on all files, there is one album I cannot love any file. I took a look at the console and the command to love the track seemed to be transferred to the website, but I cannot see it reflected on my foobar (I have a column with the loved symbol that works with all loved tracks but these).
I checked if the files are read only but their not or at least that didnt solve the problem; I am stumped and dont even know where to begin to search for the problem. Anyone experience something similar? Its no big deal but I am scratching my head over it.

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #963
as the script uses foo_customdb, it doesn't touch your files so being read-only would be irrelevant.

can you hold shift and right click a problematic track in the playlist and select Legacy commands (unsorted)>Customdb Love 1. if that makes a loved symbol appear, there's no reason why it shouldn't work via the script.

also, can you post a full example of what the console displays when you love a track via the button.

  • Emerelle
  • [*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #964
Believe it or not, but the right click command did make the love symbol appear. Once I try via the script button, I get this in the console.....
Quote
Opening track for playback: "C:\Users\****\Music\Extize - FallOut_Nation-2009\13_extize-poser_(fabrikc_remix).mp3"
foo_softplaylists: successfully loved track 'Poser (FabrikC Remix)' by 'Ext!ze'
Last.fm Playcount Sync: Contacting Last.fm....
Last.fm Playcount Sync: Last.fm responded 'OK'
Last.fm submission: Now playing... OK
WSH Panel Mod: Warning: Obsolete: Please use AppendTo() method to create sub menu instead of AppendMenuItem()

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #965
you're using a pretty old version there. try the latest version from the first post.

https://dl.dropboxusercontent.com/u/2280132...ount%20sync.zip

-extract the marc2003 folder and overwrite any files if prompted
-import the new playcount sync.txt file into the panel
-right click the panel to set your last.fm password. this is required because i no longer use foo_softplaylists - my script loves tracks natively now.

  • Emerelle
  • [*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #966
That solved it, many many thanks for your help and patience!!

HOW TO: synchronise your last.fm playback stats with foobar
Reply #967
Dear Mar2000
Please help me to solve this problem
I am trying to create a rating panel for Playing Song with WSH panel mod
I try to use the scrip from here (which originally from you,
then someone modified it with the gramma $meta(.....) - sorry i am noob in programming -


THE separated RATING PANEL SCRIPT using WSH PANEL mod IS HERE
http://www.hydrogenaudio.org/forums/index....rt=#entry840125

The problem is, with the updated script from the link above, I can rate the song I am listening easily but the Rating is updated only in metadata of the file.
While your Last.fm script using data from foo_customdb

I realize that now I have two rating database
1/ Original on the file
2/ From Foo_customdb database

Can you help me of point out how to modify the script of the Rating Panel so it can write to Customdb database. SO the LAST.FM script and This RATING PANEL can cooperate

THANK YOU SO SO MUCH!!!!!!!!!!!!!!!!!!!!
  • Last Edit: 15 February, 2014, 03:09:54 AM by vanhoivanbinh

  • foobarhelp
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #968
I don't mean to be a burden, but I've recently gotten back into foobar skins, after quickly being discouraged the last time I tried, and just as I thought I'd completed a successful installation an error: "Scripting Engine Initialization Failed (Playcount Sync by marc2003, CODE: 0x80020101)
Check the console for more information (Always caused by unexcepted script error)."

Though I've looked for hours online for a solution, none have really solved my problem. It's for the foo_ncmpcpp_mod skin, and here's the readme that I've been referring to for the installation: https://gist.github.com/twnsnd/2000446.

Debug and safe mode are unchecked. I unpacked the component folders to the foobar directory. All the fonts are installed, too.

The only instruction there that I didn't follow was removing the user_profiles_enabled file because when I did that another error came up. Perhaps I need this only works for an older version of foobar? It doesn't say anything about needing the portable version.

Anyway, I know this is a really old issue but I'd really appreciate any help you guys can give me.

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #969
Can you help me of point out how to modify the script of the Rating Panel so it can write to Customdb database.


why? you can just use my original script and foo_playcount which uses its own database.

@foobarhelp, i'm not providing support for old scripts that other people have bundled with their themes. try using my original script from the first post. minimum requirements are foobar v1.1 and WSH panel mod 1.5.0. full instructions are inside the zip.

HOW TO: synchronise your last.fm playback stats with foobar
Reply #970
After installing this mod every time I click a left button on the playlist to select a track every graphical element in my config repaints itself. I use this config. I can live with that but is there a way to disable it? I think it behaves like this to refresh the status of the icon even if there isn't any track playing but the icon could just refresh itself after we start playing the chosen track.

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #971
i'm fairly certain a selection change wouldn't cause my script to force a redraw of the whole layout. i think it's more likely to panel stack splitter causing that.

my script might force a redraw once per track when the playcount changes because i force an update of foo_customdb. you can mimic this behaviour by holding shift and right clicking a track in the playlist>legacy commands (unsorted)>customdb refresh. if that causes a flicker, then so be it.


HOW TO: synchronise your last.fm playback stats with foobar
Reply #972
i'm fairly certain a selection change wouldn't cause my script to force a redraw of the whole layout. i think it's more likely to panel stack splitter causing that.

my script might force a redraw once per track when the playcount changes because i force an update of foo_customdb. you can mimic this behaviour by holding shift and right clicking a track in the playlist>legacy commands (unsorted)>customdb refresh. if that causes a flicker, then so be it.

When I use that command there isn't any repainting. So as you said PSS might cause that...

HOW TO: synchronise your last.fm playback stats with foobar
Reply #973
Can you help me of point out how to modify the script of the Rating Panel so it can write to Customdb database.


why? you can just use my original script and foo_playcount which uses its own database.

@foobarhelp, i'm not providing support for old scripts that other people have bundled with their themes. try using my original script from the first post. minimum requirements are foobar v1.1 and WSH panel mod 1.5.0. full instructions are inside the zip.


I did it!!! You are genius Mar2000!!

HOW TO: synchronise your last.fm playback stats with foobar
Reply #974
Again, a noob question
How to export the play-count database from foobar2000 to my last.fm database?
Since some tracks in my lib has last.fm playcount smaller than its own database playcount