GMPC plugin: Album View

Several times before I tried to write a plugin that shows a list of all albums covers, this is an option found in most “standalone music managers” (itunes, etc).

Mostly I gave up quickly after noticing that Gtk does not handle this (complained about it here too).

A while back I, again, wrote a albumview, that uses a exo-wrap-table to display a lot of GmpcMetaImage. The metaimage have a nice hack that they only start quering the art when visible (on the first expose event). This made the plugin somewhat doable.  But still if you have 2000 albums, it was pretty much a no go.

So today, I decided to do it right™.  It only displays and packs the visible widgets at the same time, if you scroll it just display the next X widgets.

This saves a HUGE amount of time. The next optimalisation is to avoid having to create the widget, look in the database for the cover art, load the image and display it every time  you scroll over the same image,  the widgets are cached.

Once the cache is “warm” (or how the hell you call it) it is lightning fast,  and even with a “cold” cache it is very very doable.  Filtering the list is instant as you type, again withouth much delay. The only downside is the memory usage, but it is either that or speed. (that is also why it is a plugin and not integrated.)

If you want to give it a try, you can find the source for the plugin here. If I have some time to spare, I will see if I can create a generic widget for this.

Owh, and offcourse a movie showing it: http://random.sarine.nl/gmpc-albumview-su3.ogv. You might want to download it before watching, it is kinda large.

Q

edit: I can still think of many optimalisations to make, to speed it up further.

6 Comments

  • miker
    May 9, 2009 - 2:33 am | Permalink

    sweet, I love it qball. Keep up the good work,

  • Fredrik
    October 4, 2009 - 10:03 pm | Permalink

    Any word at all on how to use this plugin? I’ve got it installed, and not getting any errors at all. But I’m not getting any covers either. Seems to not have ane preferences available, and to my knowledge cover pics arent able to be transmitted by the mpd server. Or am I wrong? Most likely I should enter a path to my music files somewhere, but I can’t figure out where. Any and all help is very appreciated. :)

  • October 4, 2009 - 10:25 pm | Permalink

    The art is looked up by gmpc. You need to install plugins for this. Also your message absolutely does not make it clear what goes wrong.
    You are best off joining irc: #gmpc on freenode.net .

  • November 6, 2010 - 11:22 am | Permalink

    Hi
    I updated my very often used GMPC finally from 15 to 0.20.0. Album Art is what I was looking for since ages, it looks perfect and is a lot easier then the other browsers. But there is 1 thing I see as a bug:
    When there are several artists on 1 album, I store the directory with the album under the directory various artists. This works very well for artist browser etc. But the album view (0.19.101) picks out 1 artist and shows the album as if it was from that 1 artist only. And when I ask the option album-info, or when I send the album to the playlist, there is only the song from this artist given. Isn’t there a way to show the albums with various artists with “various artists” as the artist name instead of picking 1 artist?
    This is the only thing I miss to have album view and GMPC in general perfect. Thanks for the great work.

  • November 6, 2010 - 11:42 am | Permalink

    The albumview plugin tries to find VA albums like this, I guess it fails. A better solution is maybe to set the albumartist tag on the files.

    Please file a bug (with a bit more information) on the bugtracker.

  • Joost
    November 21, 2010 - 4:01 pm | Permalink

    With the Albumartist tag set it’s OK. This is exactly what I was looking for since years. Working on a touchscreen it’s perfect!

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>