Skip to main content

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

0 Members and 1 Guest are viewing this topic.
  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #825
Apparently either the artist name had a space after it


heh, you're not quite as anal as you thought. you can select files in your playlist>right click>properties and right click various fields and select clean up. this will remove any leading/trailing whitespace.
  • Last Edit: 19 April, 2013, 05:44:38 AM by marc2003

  • Kougeru
  • [*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #826
Apparently either the artist name had a space after it


heh, you're not quite as anal as you thought. you can select files in your playlist>right click>properties and right click various fields and select clean up. this will remove any leading/trailing whitespace.


XD Very true, it seems. As long as I don't notice it =P.  Also, thank you for this tip! This will save me A LOT of time. Thank you very much for both this plugin and all the help you've given.

  • ALuserX
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #827
Dear Marc,
thank you so much for creating this script+manual, that does almost exactly what I wanted and works like a charm.

One thing I want you to ask is if it could be possible to do the same with radio streams.
I listen to an internet radio pretty often and it would be awesome if I could "love" the tracks I like, so that later I could check out the list of loved tracks to get the whole album or something like that. foo_audioscrobbler manages to scrobble tracks from the radio-stream that I added to the playlist with "Add location...", but when I try to like a song that's playing at the moment it sais:

Last.fm Playcount Sync: Contacting Last.fm....
Last.fm Playcount Sync: Artist / track not found.

It's not like it's a must-have-feature or many people would need this, but I hope that if there will be a new version of your script one day, that would be to add a useful feature like this one (if it's even possible).

Thank you once more!
Cheers,
Alex
  • Last Edit: 24 April, 2013, 05:32:18 PM by ALuserX

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #828
i think you missed out the important part of the console output. it's the foo_softplaylists component that actually "loves" tracks and i don't think that works with dynamic titles in streams.

  • VlaKor
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #829
Hi? help please
"Automatically love tracks" $ifequal(%rating%,5,1,0) don't work!

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #830
maybe you have foo_playcount installed but you want to use ratings that exist in your file tags? if that is the case, you should use

Code: [Select]
$ifequal($meta(rating),5,1,0)
  • Last Edit: 27 April, 2013, 02:50:39 PM by marc2003

  • VlaKor
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #831
foo_playcount  - installed
I use rating not in the tags

  • VlaKor
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #832
Understood.
First, you put a rating of 5 and then play the track.

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #833
well the original should work then. i have foo_playcount installed and this is how i can tell it works from looking in the console.



a track has to be playing for 3 seconds for it to trigger.

  • VlaKor
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #834
Thank you
It Did not work because I play  track, and then put the rating.
We must first set the rating, and then play track )))

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #835
i'll have to think about triggering it when a rating is updated during playback. i think someone asked for this before but i forgot about it.

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #836
script updated. https://dl.dropboxusercontent.com/u/2280132...ount%20sync.zip

if enabled, the auto-love feature now triggers if title formatting changes to meet the required condition during playback. previously it would only check on playback start.

files changed:
Code: [Select]
marc2003\common7.js
playcount sync readme\playcount sync.txt
  • Last Edit: 27 April, 2013, 07:29:00 PM by marc2003

  • VlaKor
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #837
Great!

  • VlaKor
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #838
And it is possible in the opposite direction?
Love tracks > 5 rayting?

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #839
i won't be adding it to my script but here's a workaround to go in your panel. on line 63, replace this....

Code: [Select]
b.lbtn_up(x, y);


with

Code: [Select]
if (b.buttons.ps.trace(x, y) && ps.old_userloved == 0) fb.RunContextCommandWithMetadb("Rating/5", p.metadb);
b.lbtn_up(x, y);



  • VlaKor
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #840
Great!
All Love tracks > 5 rayting? It is possible to synchronize?

For earlier thanks.

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #841
you can find all loved tracks by using main menu>library>search.

Code: [Select]
%LASTFM_LOVED_DB% IS 1


then right click the results>playback statistics>rating>5

  • VlaKor
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #842
Genius!!!
Autoplaylist created )))
  • Last Edit: 28 April, 2013, 12:47:50 PM by VlaKor

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #843
updated: right click>Update script will work for anyone who has updated since the 2nd april. otherwise full download is here: https://dl.dropboxusercontent.com/u/2280132...ount%20sync.zip
i've created a changelog    https://dl.dropboxusercontent.com/u/2280132...e/changelog.txt

Code: [Select]
7.2013.04.30.01

Script no longer requires foo_softplaylists to love tracks.
Right click the panel to set your password. Although you
enter it in plain text, it's not saved anywhere. It's just
used temporarily to authenticate once with Last.fm.
  • Last Edit: 29 April, 2013, 11:52:58 PM by marc2003

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #844
another update: https://dl.dropboxusercontent.com/u/2280132...e/changelog.txt

Code: [Select]
7.2013.05.01.01

Now supports artist field remapping for loving/unloving
tracks and auto-updates. This might be handy if you want to
submit just the first value of a multi-value tag eg:
$meta(artist,0). For best results it should match what you set
in the foo_audioscrobbler preferences.


for existing users, right click>Update script should work but there will be an additional step to take after the restart. just follow the dialog box.

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

files changed:
Code: [Select]
marc2003\common7.js
playcount sync readme\playcount sync.txt
  • Last Edit: 30 April, 2013, 09:53:39 PM by marc2003

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #845
could a kind moderator please replace the entire contents of the first post with this....


this isn't a proper component but a script which utilises 2 other components (WSH panel mod & foo_customdb) to do the following:

-it can import the playcount/loved tracks from your entire last.fm library into foobar. it uses foo_customdb so your files are not touched.
-after doing the library import it will automatically update in the background as you listen.
-it can love/unlove tracks on last.fm via a button.
-it can automatically love tracks when they are played based on title formatting (for example, it can be set to automatically love tracks with a RATING of 5)
-you can display/filter the data in any custom columns, library viewers, display panels, etc using these simple tags:

Code: [Select]
%LASTFM_PLAYCOUNT_DB%
%LASTFM_LOVED_DB% //has a value of 1 for loved tracks


full instructions can be found here: https://dl.dropboxusercontent.com/u/2280132...ount%20sync.zip
changelog: https://dl.dropboxusercontent.com/u/2280132...e/changelog.txt

updated 30/04/13: no longer requires foo_softplaylists meaning artist field remapping is supported for loving tracks and background updates.
  • Last Edit: 01 May, 2013, 11:30:38 AM by marc2003

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #846
if anybody has been following the other WSH script thread or looks at deviantart, you may have noticed falstaff/br3tt has created a new fully featured playlist in WSH panel mod. it has customisable columns which means you can change it to display your last.fm info but the best part is that it allows you to click a "heart" icon to set the "mood" for any track. by default this tags your files but with his permission i've created a modification that allows it to love/unlove any playlist item on last.fm regardless of what is now playing.

here is what you need to do:

-you must be running the very latest version of my script in this thread. existing users should check inside the panel and look at line 10. it should read:

Code: [Select]
p.version = "7.2013-05-01.01";


if it doesn't, you need to re-download the full zip, extract the marc2003 folder and import the new playcount sync.txt file. then right click the panel to set your password as it no longer uses foo_softplaylists to love tracks. it does it natively now.

-if your panel version is already current, you should right click>Update script to make sure the background file is up to date as well.

-you need version 0.0.7 of falstaff's script and make sure you install the guifx v2 transports font on his page as well.

http://browse.deviantart.com/art/WSH-Playl...0-0-7-368997689

-now you need to download my modified file from here. https://dl.dropboxusercontent.com/u/2280132.../WSHplaylist.js

-it needs to be saved in your profile folder\wsh_br3tt\js folder, over writing the file that is already there. make sure foobar is closed while you do this.

-with your playlist now installed, you can customise the "mood" column to display your last.fm loved status instead. right click the column>edit this column>pattern

Code: [Select]
$ifequal(%LASTFM_LOVED_DB%,1,1,0)


-there is no plays column by default, so right click any column header>columns>plays to add it.

-now right click the Plays header>edit this column>pattern and enter

Code: [Select]
[%LASTFM_PLAYCOUNT_DB%]


you should now have something that looks like this:



now you can click the "heart" of any playlist item and it will love/unlove the track depending on the current value and it should update the playlist almost immediately. check the foobar console for success/failure messages.

you may want to hide my "button" out of the way somewhere but it must be active in your layout. it "listens" for notifications from the playlist to do the communication with last.fm.

  • ubercow
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #847
Hi, thanks for the script I absolutely love it.

I'm having trouble with tracks with an ampersand in the artist or title field. When I try to love them with your button, the console shows:

Last.fm Playcount Sync: Invalid method signature supplied


and the track is not loved, in the library or on last.fm. Is this a bug or have I done something wrong?
  • Last Edit: 19 May, 2013, 09:39:09 AM by ubercow

  • marc2003
  • [*][*][*][*][*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #848
oh fudge. i could have sworn i had this working during testing. i know i had to make changes late on with the md5 hasher i used so i obviously didn't go back and test again. it should be fixed now.

existing users: right click>Update script.
full download: https://dl.dropboxusercontent.com/u/2280132...ount%20sync.zip
changelog: https://dl.dropboxusercontent.com/u/2280132...e/changelog.txt

thanks for spotting my mistake. 
  • Last Edit: 19 May, 2013, 10:56:53 AM by marc2003

  • ubercow
  • [*]
HOW TO: synchronise your last.fm playback stats with foobar
Reply #849
Well that was quick, thanks very much marc, it works perfectly now!