Author Topic: last.fm import  (Read 7162 times)

aboettger

  • Guest
last.fm import
« on: February 17, 2010, 14:05:24 »
It would be great to import play counts and loved tracks into gmb.  :)

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: last.fm import
« Reply #1 on: February 17, 2010, 18:04:37 »
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

aboettger

  • Guest
Re:last.fm import
« Reply #2 on: February 17, 2010, 18:11:18 »
here is a working version:
http://addons.songbirdnest.com/addon/1458

maybe helps

aboettger

  • Guest
Re:last.fm import
« Reply #3 on: February 18, 2010, 03:04:06 »
first try:

[email protected] ~/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.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: last.fm import
« Reply #4 on: February 18, 2010, 04:01:55 »
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.

aboettger

  • Guest
Re:last.fm import
« Reply #5 on: February 18, 2010, 14:32:54 »
How many programmers works on gmb? My last perl code is more than ten years old. :-\

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: last.fm import
« Reply #6 on: February 18, 2010, 21:49:17 »
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

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: last.fm import
« Reply #7 on: March 10, 2011, 16:47:19 »
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?

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: last.fm import
« Reply #8 on: March 12, 2011, 06: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.

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: last.fm import
« Reply #9 on: March 12, 2011, 11:13:37 »
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.
« Last Edit: March 13, 2011, 00:43:03 by laite »

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: last.fm import
« Reply #10 on: March 13, 2011, 20: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.

:-[

Sergiy Borodych

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • My Home
Re: last.fm import
« Reply #11 on: March 13, 2011, 20:08:57 »
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
« Last Edit: March 13, 2011, 20:13:10 by Sergiy Borodych »