getmusicbee.com

General => MusicBee Wishlist => Topic started by: percy74 on February 11, 2011, 08:48:59 PM

Title: Sync 'Last Played' info with Last.fm
Post by: percy74 on February 11, 2011, 08:48:59 PM
One of my favorite features of MusicBee is the ability to sync playcounts with my last.fm profile.  Would it also be possible to sync Last Played info as well?  I listen to Music Bee at work as well as at home, and being able to sync Last Played information with each computer would be very handy.  That way when I go home after work and play some music, my home computer will know which tracks I listened to at the office and won't repeat them.
Title: Re: Sync 'Last Played' info with Last.fm
Post by: Steven on February 13, 2011, 10:32:14 PM
i dont think last.fm provides that info - only playcounts. Are you aware of another app that does this?
The only thing i know of is you can get the week a track was played or i guess if you synch every day, MB could update the last played date to today if the playcount is incremented but thats not very reliable
Title: Re: Sync 'Last Played' info with Last.fm
Post by: Maleko12 on February 13, 2011, 10:54:20 PM
I mentioned this before:

http://getmusicbee.com/forum/index.php?topic=2428.0

So, of course, I'll give this a +1.

It's not the best for accuracy, but it's sure better than having "Unknown". I would have this an option separate from from getting the playcounts from last.fm.
Title: Re: Sync 'Last Played' info with Last.fm
Post by: percy74 on February 14, 2011, 10:37:43 PM
i dont think last.fm provides that info - only playcounts. Are you aware of another app that does this?
The only thing i know of is you can get the week a track was played or i guess if you synch every day, MB could update the last played date to today if the playcount is incremented but thats not very reliable
No I'm not aware of any other player that does this, it's just a dream I have.  However, I do know that the last.fm API method "user.getRecentTracks" does provide a Unix time stamp for every track a user has ever scrobbled to last.fm.  I don't know if that would help you at all.
Title: Re: Sync 'Last Played' info with Last.fm
Post by: Steven on February 14, 2011, 10:41:49 PM
yes i think that would be exactly what is needed to do this, and the crazy thing is i already make use of the api to sync playcounts so i dont know why i didnt notice before. Thanks for pointing it out
Title: Re: Sync 'Last Played' info with Last.fm
Post by: percy74 on February 14, 2011, 11:18:47 PM
No problem.  Thanks for reading and considering!
Title: Re: Sync 'Last Played' info with Last.fm
Post by: Steven on February 19, 2011, 12:10:13 PM
i've done this now so if the last last played according to last.fm is > 1 hour since last played on your PC, it updates the last played in your library.
Also I have changed the way the last.fm synch is done so its now able to includes album when matching tracks in your library. However the new way is quite a bit slower on the very first synch, then much faster on subsequent synchs.

link to be updated
Title: Re: Sync 'Last Played' info with Last.fm
Post by: antiPOP on February 19, 2011, 12:55:36 PM
Huge thanks for this feature, Steven. Great job! :)
Title: Re: Sync 'Last Played' info with Last.fm
Post by: Steven on February 19, 2011, 12:57:48 PM
actually i need to make another adjustment to it - on the first run, its going to take way too long (up to an hour for people with large histories) but i can see a way to improve that
Title: Re: Sync 'Last Played' info with Last.fm
Post by: antiPOP on February 19, 2011, 01:08:30 PM
It took about 10 minutes for mine and thats not so bad ;]
Title: Re: Sync 'Last Played' info with Last.fm
Post by: Steven on February 19, 2011, 01:18:54 PM
i know you have a large history, so in that case i will leave it as is:
http://www.mediafire.com/?hcgn9ip2c7q2dxp
Title: Re: Sync 'Last Played' info with Last.fm
Post by: antiPOP on February 19, 2011, 01:38:00 PM
I divided my Library to 2 smaller libraries. I'll check an update soon. Unfortunately there is a one thing which make pain in my a**.Last.fm API doesn't provide info from which album the track was scrobbled. There is a lot albums, where the same track is present on the more than one album, i.e. the live albums, very best collections, or another compilations, In result I'm getting this:

(http://img69.imageshack.us/img69/1853/lastfms.jpg) (http://img69.imageshack.us/i/lastfms.jpg/)

(http://img524.imageshack.us/img524/7468/35167515.jpg) (http://img524.imageshack.us/i/35167515.jpg/)




Title: Re: Sync 'Last Played' info with Last.fm
Post by: Steven on February 19, 2011, 01:50:27 PM
i'm confused what the issue is. Last.fm API now has album information in the history, so MB now makes use of that.
When i check you MB screenshot, checking "Devil Take the Hindmost", in your last.fm library the play count is 10 which matches what MB has (i dont know where you got the screenshot showing 2 plays)
Title: Re: Sync 'Last Played' info with Last.fm
Post by: antiPOP on February 19, 2011, 01:52:28 PM
I'll PM you
Title: Re: Sync 'Last Played' info with Last.fm
Post by: antiPOP on February 19, 2011, 01:57:49 PM
I forgot to mention. MB is showing the same play count value from such track, no matter on which artist album the track is present, compilation, live album or studio album.
Moreover, maybe it is possible that MB could checking played tracks by albums? I think that will solve this issue.
Title: Re: Sync 'Last Played' info with Last.fm
Post by: Steven on February 19, 2011, 06:23:39 PM
this resolves the issue with playcounts not being reset for albums that arent scrobbled to last.fm
http://www.mediafire.com/?wplsf7fn7kvpzkq
Title: Re: Sync 'Last Played' info with Last.fm
Post by: Maleko12 on February 19, 2011, 06:46:21 PM
AWESOME!!! It works beautifully. The first sync also took about 10 minutes, and playcounts for tracks on different albums are not the same (which is the first time I've ever had this happen with any program)! Thanks as always Steven!

And congrats on hitting over 5000 posts!
Title: Re: Sync 'Last Played' info with Last.fm
Post by: percy74 on February 21, 2011, 06:02:43 PM
Just...incredible!  Thank you for this outstanding update.  I'm getting out my wallet right now to make a donation.  This is hands down the best player I've ever used.  Thank you again, Steven.