It would be great to import play counts and loved tracks into gmb.  :)

The main problem is that in last.fm ignores different version of songs : all songs with same title and same artist are considered as one song :(
That said, Bor81 made a script that imported playcounts from last.fm : http://bor.org.ua/projects/lastfm2gmb/
see this thread in the old forum :
http://sourceforge.net/projects/gmusicbrowser/forums/forum/493124/topic/3271226


first try:

andreas@sturm ~/Desktop % ./lastfm2gmb.pl -k lastfm2gmb -u account
Looking up gmb library Use of uninitialized value $stats{"gmb_tracks"} in concatenation (.) or string at ./lastfm2gmb.pl line 116.
  tracks (0 skipped as dup)
Error: Can't get url 'http://ws.audioscrobbler.com/2.0/?api_key=lastfm2gmb&user=account&method=user.getWeeklyChartList'; - 403 Forbidden
Cant get data from lastfm at ./lastfm2gmb.pl line 124.

2nd try with a new api key:

./lastfm2gmb.pl -c -k f4604474ca255447523c9c45a63964b5 -u account
Looking up gmb library Use of uninitialized value $stats{"gmb_tracks"} in concatenation (.) or string at ./lastfm2gmb.pl line 116.
  tracks (0 skipped as dup)
LastFM request 'WeeklyChartList' found 212 pages
LastFM request 'WeeklyTrackChart' pages .........Use of uninitialized value $playcount in addition (+) at ./lastfm2gmb.pl line 150.
Can't use string ("1") as a HASH ref while "strict refs" in use at ./lastfm2gmb.pl line 140.

I guess you are using v1.1.x, there was a very small bug that prevented it : http://bit.ly/bx39bn
I tested it with a few songs, it seems to work. :)
When I let it whole all the data, it died with when getting an error 500 from last.fm, maybe it was just a fluke, or maybe the page requests to last.fm should be less frequent, I don't know.

About the plugin for songbird: interesting, maybe one day I'll do it, but I've got a lot of more urgent things to do. Especially since, as I said, multiple versions of the same song can't really work with this.

How many programmers works on gmb? My last perl code is more than ten years old. :-\

only me currently :)
But if you want to code something, I'd be happy to help you, for both perl code or integration into gmb code.
Feel free to drop by on irc : #gmusicbrowser on freenode.net

Quote from: aboettger on February 17, 2010, 09:05:24
It would be great to import play counts and loved tracks into gmb.  :)

Bumping an old topic, but I would really like this to work. I tried lastfm2gmb.pl (http://gmusicbrowser.org/dokuwiki/doku.php?id=third_party_apps:lastfm2gmb) but it gave always an error message "org.freedesktop.DBus.Error.ServiceUnknown: The name org.gmusicbrowser was not provided by any .service files" even though I tried many times, and made sure that MPRIS1 & MPRIS2 are 'on' in GMBs plugins.

Any ideas?

gmusicbrowser must be running when you use this script, maybe that's why.
btw, the script is not on the author's server anymore, if someone can send me the latest version, if possible with the README and other files, I'll put it somewhere on gmb's site, thanks.

#9 March 12, 2011, 06:13:37 Last Edit: March 12, 2011, 19:43:03 by laite
Quote from: Quentin Sculo on March 12, 2011, 01:36:21
gmusicbrowser must be running when you use this script, maybe that's why.
btw, the script is not on the author's server anymore, if someone can send me the latest version, if possible with the README and other files, I'll put it somewhere on gmb's site, thanks.

Yes, it was running. I also checked with D-feet Dbus tool that gmusicbrowser sends data and everything seemed to be all right.

I found the script here: https://github.com/bor/lastfm2gmb

EDIT: I attached a pic that shows dbus-send working correctly.

For ducks sake, I'm so sorry and embarrassed.

Everything works just the way it should, I just messed up by using 'sudo' before perl all the time. So sorry for wasting everybodys time.

:-[

#11 March 13, 2011, 15:08:57 Last Edit: March 13, 2011, 15:13:10 by Sergiy Borodych
Quote from: laite on March 13, 2011, 15:00:05
For ducks sake, I'm so sorry and embarrassed.

Everything works just the way it should, I just messed up by using 'sudo' before perl all the time. So sorry for wasting everybodys time.

:-[
it’s never too late to mend/to learn

P.S.
I update wiki page
http://gmusicbrowser.org/dokuwiki/doku.php?id=third_party_apps:lastfm2gmb