Author Topic: comprehensive lastfm plugin  (Read 7438 times)

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
comprehensive lastfm plugin
« on: March 31, 2011, 15:39:42 »
hi everyone,
as some of you might know i did a lastfm plugin that fetches information about artists from lastfm, it's called artistinfo and it has made its way upstream into gmusicbrowser.

i've been thinking about creating a more comprehensive lastfm plugin but before i start with that, i want to decide on what's interesting to have from lastfm for other people/users. obviously there's a difference between what you can easily render in a music-app and what a webbrowser can do for you, but basically all that's supported by lastfm's api is somewhat feasible. feel free to browser the api methods to get an idea of what can be done.

up to now i've received a request to import the tags from lastfm (which are a mess imo), but if you have any other idea this is the time and place to let me know.
i'm also considering support for "similar songs" (options for only local and "all" results) to help with creating playlists, but not sure how useful you find that idea.
be aware that some features require the user to be logged in (which doesn't mean it's impossible to do it though).

there are different ways of implementing a plugin like that on the basis of what we already have, i see three variants atm:
1) extend the artistinfo plugin
2) merge the artistinfo plugin and the lastfm scrobbler into a new big lastfm plugin (obviously with options to de/activate certain functions of the plugin)
3) create a new and separate plugin

i haven't really decided on what way to go here but suggestions and thoughts are welcome.

i'll try to keep a list of the features you people suggest here and update it from time to time.


list of suggestions
  * similar songs (ochosi)
  * separate 'tags' - field for last.fm tags, which would work similarly like labels (laite)
  * see artist images as a separate panel (preferably with customizable amount of autodownload, for example 1/5/10 pictures) (laite)
  * show song, artist, album playcount from lastfm (laite)
  * expanding the Context widget to also include top tracks and top albums by the current artist. (trasdahl)
  * popularity (either as total listeners or total playcount) available as a songlist/sontree column, perhaps displayed as rating stars, a progress bar or something like the column that Spotify uses. (trasdahl)
  * option "Find songs by similar artists" in the right-click popup menu in songlists. (trasdahl)
  * option to fill/autocorrect (selected) tags in the song properties dialog. (trasdahl)
« Last Edit: April 04, 2011, 20:47:56 by ochosi »

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: comprehensive lastfm plugin
« Reply #1 on: March 31, 2011, 19:10:04 »
I would like to see:

- ability to ban/love tracks from gmb (I would like to have button/key command that besides loving/banning from last.fm does something in gmb, for example puts 'loved'-label to track at the same time when loving song)
- see artist images as a separate panel (preferably with customizable amount of autodownload, for example 1/5/10 pictures)
- be able to build 'radio stations' from users local library according to artist, track or tag
  - related: It would be cool to have separate 'tags' - field for last.fm tags, which would work similarly than labels (I don't really want to mix my labels (or genres) with last.fm tags)
- show album/artist/track playcounts for current song (in ideal situation there could be somekind of database to store these in gmb but I understand it's not this plugins purpose  :) )
- possibility to use last.fm autocorrection to make tracks tags proper (perhaps with confirmation dialog?)

Well, here are my quick wishes. I understand if they don't get implemented as such :)

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: comprehensive lastfm plugin
« Reply #2 on: March 31, 2011, 19:44:32 »
Quote
- ability to ban/love tracks from gmb (I would like to have button/key command that besides loving/banning from last.fm does something in gmb, for example puts 'loved'-label to track at the same time when loving song)
hm, i think that's rather something that would have to be implemented in gmusicbrowser itself, not in a lastfm plugin - or did you mean something like synced love/ban behavior with lastfm?
be that as it may, i think a general "love/ban"-system would have to be implemented in gmusicbrowser first
Quote
- be able to build 'radio stations' from users local library according to artist, track or tag
by that you mean creating filters?
Quote
- show album/artist/track playcounts for current song (in ideal situation there could be somekind of database to store these in gmb but I understand it's not this plugins purpose  Smiley )
you mean the (total?) playcount/listeners from lastfm or just local playcount information?
Quote
- possibility to use last.fm autocorrection to make tracks tags proper (perhaps with confirmation dialog?)
hmm, that's one thing i've also been thinking about for some time. i'm not entirely sure how to implement that. from my thoughts about this atm i'd say that this should go into a separate plugin, because it does more than just display info from lastfm.

the other suggestions will be moved to the list (first post).

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: comprehensive lastfm plugin
« Reply #3 on: March 31, 2011, 20:57:37 »
Quote
- be able to build 'radio stations' from users local library according to artist, track or tag
by that you mean creating filters?

Well, I had in mind something like dynamic queue, where plugin would always keep AUTOFILL-amount of songs similar to selected artist/track/tags

Quote
- show album/artist/track playcounts for current song
you mean the (total?) playcount/listeners from lastfm or just local playcount information?

I would like to see how many times I have listened current artist/album in the past (from last.fm)

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: comprehensive lastfm plugin
« Reply #4 on: March 31, 2011, 21:20:18 »
Quote
Well, I had in mind something like dynamic queue, where plugin would always keep AUTOFILL-amount of songs similar to selected artist/track/tags
hm, ok, i get what you mean, but in fact i think making filters for this makes more sense. (at least imo)


Quote
I would like to see how many times I have listened current artist/album in the past (from last.fm)
wouldn't a one-time import of your lastfm playcount be sufficient to achieve that? at least i don't see a good reason to keep two playcounts around separately.

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: comprehensive lastfm plugin
« Reply #5 on: March 31, 2011, 21:54:25 »
Quote
I would like to see how many times I have listened current artist/album in the past (from last.fm)
wouldn't a one-time import of your lastfm playcount be sufficient to achieve that? at least i don't see a good reason to keep two playcounts around separately.

I'm not sure if I understand, so I'm trying to elaborate:

Let's say I'm playing track "Cross Eyed Mary" from "Jethro Tull"s album "Aqualung". I have three playcounts: One for track (eg. 5), one for album (eg. 50) and one for artist (eg. 200). Now, I have imported tracks count previously, but (just out of curiosity) I'd like to see at the same time how many times I have played Jethro Tull (or album 'aqualung') in total. Plugin doesn't necessarily need to save these counts anywhere (although that would be nice), just show them in some panel, perhaps next to artistinfo.

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: comprehensive lastfm plugin
« Reply #6 on: March 31, 2011, 22:14:41 »
right, now i get what you mean. i'll add it to the list.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: comprehensive lastfm plugin
« Reply #7 on: April 02, 2011, 18:28:31 »
2 comments :
- album/artist playcount doesn't have anything to do with last.fm unless I'm missing something. But being able to display a placount value deduced from tracks playcount is planned (though it has does sometimes takes a long time to be implemented, sorry)
- love/ban buttons : very easy to do within the plugin with the ExtraButtons widget, the only reason I didn't implement it yet, is it requires using the new last.fm authentification system.

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: comprehensive lastfm plugin
« Reply #8 on: April 02, 2011, 20:14:20 »
Quote
- album/artist playcount doesn't have anything to do with last.fm unless I'm missing something. But being able to display a placount value deduced from tracks playcount is planned (though it has does sometimes takes a long time to be implemented, sorry)
yes i agree, in fact i implemented the album-playcount in the artistinfo plugin in git already. it's in the statistical tooltip you get when hovering over the artist-stats.

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: comprehensive lastfm plugin
« Reply #9 on: April 04, 2011, 18:17:39 »
Here is my wish-list:

- expanding the Context widget to also include top tracks and top albums by the current artist.
- popularity (either as total listeners or total playcount) available as a songlist/sontree column, perhaps displayed as rating stars, a progress bar or something like the column that Spotify uses.
- filterpane with locally available similar artists.
- option "Find songs by similar artists" in the right-click popup menu in songlists.
- option to sync playcount with last.fm, meaning: first a one-time import (possibly available later as a button in preferences), then updating the playcount whenever a track starts playing.
- last.fm radio stations (streaming).
- option to fill/autocorrect (selected) tags in the song properties dialog.

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: comprehensive lastfm plugin
« Reply #10 on: April 04, 2011, 20:46:39 »
Quote
- filterpane with locally available similar artists.
already done in git. currently this is implemented as a tickbox in the artistinfo-plugin's preferences ("Only show similar artists from local library"). on a middle-click you can also filter your songtree on the artist you clicked. or did you mean something else?

Quote
- option to sync playcount with last.fm, meaning: first a one-time import (possibly available later as a button in preferences), then updating the playcount whenever a track starts playing.
atm there's a script to do that one-time sync, iirc there are a few problems with distinguishing multiple versions of a track, so not sure how nicely this will ever work.
updating the playcount whenever a track starts playing is exactly what the scrobble-plugin does. pulling the playcount info from lastfm when playing back sounds wrong after you've once synced your playcounts.

Quote
- last.fm radio stations (streaming).
don't think i wanna implement that since it's not free and i personally don't plan on paying for it (meaning: i'm not going to use it).

i'll add the other wishes to the list.

ps: if any of you feel like providing mockups for those suggestions that don't have an obvious/straight-forward UI implementation i'd be happy to see them.
« Last Edit: April 04, 2011, 20:48:45 by ochosi »

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: comprehensive lastfm plugin
« Reply #11 on: April 05, 2011, 13:00:05 »
Quote
filterpane with locally available similar artists
i was thinking about a filterpane tab along with artist, album genre etc., but i guess it would be confusing to mix the last.fm info in with the normal filters. Besides, maybe this is impossible in a plugin?

Quote
iirc there are a few problems with distinguishing multiple versions of a track
the track.getInfo function in the last.fm api accepts either artist+track (which can result in ambiguities) or a musicbrainz id (which is unique). The resulting xml document contains a mbid tag which i guess could be checked up against musicbrainz? To me the ambiguity isn't too big a problem, but i agree it's not very pretty.

Quote
atm there's a script to do that one-time sync
i know, but it took forever and gave me only a 500 server error. And besides, it's an external script, which i guess would exclude some users. It seems that the script pulls weekly chartlists. I think it is possible to use user.getTopTracks and add the limit=1000 option, which would result in fewer requests.

Quote
pulling the playcount info from lastfm when playing back sounds wrong after you've once synced your playcounts
i scrobble from all sorts of different sources, which means the last.fm playcount increases faster than the gmb playcount.

Quote
last.fm radio ...
there are some free tracks, so it is possible to build a radio station without subscribing (the rhythmbox last.fm plugin does this). but it may be so limited that it's not worth it.

anyway, great initiative!

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: comprehensive lastfm plugin
« Reply #12 on: April 05, 2011, 14:45:04 »
Quote
i scrobble from all sorts of different sources, which means the last.fm playcount increases faster than the gmb playcount.

I don't know if you noticed, but I made a script for getting current tracks playcount from last.fm (because I scrobble a lot from my phone and also because lastfm2gmb didn't work that well): http://forum.gmusicbrowser.org/index.php?topic=335.0

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: comprehensive lastfm plugin
« Reply #13 on: April 06, 2011, 12:08:57 »
Yup, I noticed, and i works exactly the way it should :) I was merely suggesting it because it would be nice to combine the one-time import and pulling playcount with the rest of the functionality in one grand unified last.fm plugin. But as long as the functionality is available, I guess it's not the biggest priority.

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: comprehensive lastfm plugin
« Reply #14 on: April 06, 2011, 12:29:50 »
(...) it would be nice to combine the one-time import and pulling playcount with the rest of the functionality in one grand unified last.fm plugin.

Yep, this would be really nice.