Now Playing with Art

Michael Pyne added support for album art to Juk‘s D-Bus interface, and modified the now playing dataengine to get this artwork.  The dataengine already supported getting artwork from MPRIS-enabled players, and Amarok has provided album artwork over MPRIS for a while.

So I’ve now added the display of album artwork to the now playing widget:

The Now Playing applet with album artwork

The Now Playing widget with album artwork

Naturally, this disappears (and the text moves over to the left) when there is no album artwork available, and the image resizes to be as tall as the text when you resize the widget.

Oh, and I fixed the scrollbars to work when you use the mouse wheel on them.  This fix will be in the next release of 4.2 (although the artwork won’t be).

Now I need to improve the functionality of the widget when it’s on the panel.  And any help in generally making the widget prettier would be most welcome.  I really don’t like the scrollbars, and the album art needs a frame.

About these ads

13 Responses to “Now Playing with Art”

  1. Sven Says:

    What about having this plasmoid as a containment, i.e. fullscreen? Or make it adapt its layout, if it is pulled bigger, i.e. move the artwork on top of the text and display a bigger picture, if there is enough space. That way users could place it on the screensaver containment and use it for parties etc.

  2. randomguy3 Says:

    I have to say, I do miss the thing (I forget the name) that used to sit in the kicker panel and had a full-screen mode.

    I’m not sure a containment mode would be suitable, though. And I don’t know whether “party mode” would work best as an expanded version of the same applet or another applet.

  3. shiny Says:

    Kirocker was the name.

  4. Recopilación de enlaces de interés. 8ª Semana de 2009 | KDE Blog Says:

    [...] El plasmoide “Now Playing…” con carátulas. Vía: return -EWTF [...]

  5. maninalift Says:

    Can I get this to work over ssh?

  6. Giles Says:

    I know that the function of the scrollbars can be worked out once the application has been used for a few minutes, but I think a couple of small icons to identify the function of the two scrollbars might be useful. Perhaps a little speaker icon above the vertical scrollbar and an egg timer to the left of the horizontal scrollbar would help for new users.

  7. Alex Says:

    “and the album art needs a frame.”

    No it doesn’t.

  8. randomguy3 Says:

    @maninalift: what do you mean by “get it to work over ssh”? What is at which end of the ssh tunnel?

    Basically, the dataengine that powers the widget uses the session D-Bus to communicate with both Juk and Amarok. So if plasma is talking to the same D-Bus daemon as Amarok or Juk, it will work. If not, it won’t.

  9. Dread Knight Says:

    Looks good. Atm i was using the other similar plasmoid just because it had album artwork feature :)

    Cheers!

  10. oliverd Says:

    Any hope of bringing back the moodbars that Amarok used to have:

    http://amarok.kde.org/wiki/Moodbar

    I found those really handy.

  11. Johan Says:

    Great work! Completely agree with the author on the album frame and the bars. Still, if it’s possible to make it even more sleek and sexy then you’d have a clear winner :)

    PS! do we really need the bars? Perhaps they could be hidden and activated in some kind of way when you need it?

    Keep up the good work!

  12. Chiffa Says:

    “So I’ve now added the display of album artwork to the now playing widget”

    sorry for maybe dull question, but how exactly you did this. ‘nowplaying’ dataengine gives me QVariant(QPixmap) string for the artwork and i have no idea what to do with it

    thanks in advance

    • randomguy3 Says:

      Well, it’s just a QVariant containing a QPixmap. So pull out the QPixmap (using QVariant::value(), say) and use it as you would any other pixmap.

      Check out the source code for the nowplaying applet for an example.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: