Getting song metadata from Banshee 1.0 RC 1 via D-Bus

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting song metadata from Banshee 1.0 RC 1 via D-Bus

Paul Kuliniewicz-2
I'm working on adding support for Banshee 1.0 to Music Applet [0], but
so far I haven't found a way to get the metadata for the current song
from the D-Bus interface.  I can get its URI by calling GetCurrentUri on
the PlayerEngine object, but I don't see any methods that take a URI and
return the associated metadata, or to just get the metadata for the
current song directly (like there was in 0.13.x).  Am I missing
something, or will this be added in a later version?

Thanks.


[0] http://www.kuliniewicz.org/music-applet/

_______________________________________________
Banshee-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/banshee-list

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting song metadata from Banshee 1.0 RC 1 via D-Bus

Gabriel Burt
2008/6/3 Paul Kuliniewicz <[hidden email]>:
> I'm working on adding support for Banshee 1.0 to Music Applet [0], but
> so far I haven't found a way to get the metadata for the current song
> from the D-Bus interface.  I can get its URI by calling GetCurrentUri on
> the PlayerEngine object, but I don't see any methods that take a URI and
> return the associated metadata, or to just get the metadata for the
> current song directly (like there was in 0.13.x).  Am I missing
> something, or will this be added in a later version?

You should use dbus-explorer or d-feet to see what Banshee exposes
over dbus.  You need to get CurrentTrack, not CurrentUri.  Good luck!

Gabriel
_______________________________________________
Banshee-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/banshee-list
Reply | Threaded
Open this post in threaded view
|

Re: Getting song metadata from Banshee 1.0 RC 1 via D-Bus

Paul Kuliniewicz-2
On Tue, 2008-06-03 at 20:27 -0500, Gabriel Burt wrote:

> 2008/6/3 Paul Kuliniewicz <[hidden email]>:
> > I'm working on adding support for Banshee 1.0 to Music Applet [0], but
> > so far I haven't found a way to get the metadata for the current song
> > from the D-Bus interface.  I can get its URI by calling GetCurrentUri on
> > the PlayerEngine object, but I don't see any methods that take a URI and
> > return the associated metadata, or to just get the metadata for the
> > current song directly (like there was in 0.13.x).  Am I missing
> > something, or will this be added in a later version?
>
> You should use dbus-explorer or d-feet to see what Banshee exposes
> over dbus.  You need to get CurrentTrack, not CurrentUri.  Good luck!
Weird; I was using qdbus (which also lists what's exposed), but for some
reason CurrentTrack didn't show up in its list.

_______________________________________________
Banshee-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/banshee-list

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting song metadata from Banshee 1.0 RC 1 via D-Bus

Chow Loong Jin
Paul Kuliniewicz wrote:

> On Tue, 2008-06-03 at 20:27 -0500, Gabriel Burt wrote:
>> 2008/6/3 Paul Kuliniewicz <[hidden email]>:
>>> I'm working on adding support for Banshee 1.0 to Music Applet [0], but
>>> so far I haven't found a way to get the metadata for the current song
>>> from the D-Bus interface.  I can get its URI by calling GetCurrentUri on
>>> the PlayerEngine object, but I don't see any methods that take a URI and
>>> return the associated metadata, or to just get the metadata for the
>>> current song directly (like there was in 0.13.x).  Am I missing
>>> something, or will this be added in a later version?
>> You should use dbus-explorer or d-feet to see what Banshee exposes
>> over dbus.  You need to get CurrentTrack, not CurrentUri.  Good luck!
>
> Weird; I was using qdbus (which also lists what's exposed), but for some
> reason CurrentTrack didn't show up in its list.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Banshee-list mailing list
> [hidden email]
> http://mail.gnome.org/mailman/listinfo/banshee-list
Take a look at the patch I submitted for adding Banshee 1.0 support to
Pidgin's MusicTracker plugin. There's a sample implementation there for
getting the required data. Written in C.

The link:
http://code.google.com/p/musictracker/issues/detail?id=87
--
Hyperair


_______________________________________________
Banshee-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/banshee-list

signature.asc (269 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting song metadata from Banshee 1.0 RC 1 via D-Bus

Paul Kuliniewicz-2
In reply to this post by Gabriel Burt
On Tue, 2008-06-03 at 20:27 -0500, Gabriel Burt wrote:

> 2008/6/3 Paul Kuliniewicz <[hidden email]>:
> > I'm working on adding support for Banshee 1.0 to Music Applet [0], but
> > so far I haven't found a way to get the metadata for the current song
> > from the D-Bus interface.  I can get its URI by calling GetCurrentUri on
> > the PlayerEngine object, but I don't see any methods that take a URI and
> > return the associated metadata, or to just get the metadata for the
> > current song directly (like there was in 0.13.x).  Am I missing
> > something, or will this be added in a later version?
>
> You should use dbus-explorer or d-feet to see what Banshee exposes
> over dbus.  You need to get CurrentTrack, not CurrentUri.  Good luck!
Now that that's working, I have a few follow-up questions:

1. Is there a way to get the album art for the current song?

2. Is there a way to set the rating of the current song?

3. When I call GetCurrentTrack, the rating always comes back as 0, even
if a rating exists.  Should I file a bug?

_______________________________________________
Banshee-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/banshee-list

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting song metadata from Banshee 1.0 RC 1 via D-Bus

Chow Loong Jin
Paul Kuliniewicz wrote:

> On Tue, 2008-06-03 at 20:27 -0500, Gabriel Burt wrote:
>> 2008/6/3 Paul Kuliniewicz <[hidden email]>:
>>> I'm working on adding support for Banshee 1.0 to Music Applet [0], but
>>> so far I haven't found a way to get the metadata for the current song
>>> from the D-Bus interface.  I can get its URI by calling GetCurrentUri on
>>> the PlayerEngine object, but I don't see any methods that take a URI and
>>> return the associated metadata, or to just get the metadata for the
>>> current song directly (like there was in 0.13.x).  Am I missing
>>> something, or will this be added in a later version?
>> You should use dbus-explorer or d-feet to see what Banshee exposes
>> over dbus.  You need to get CurrentTrack, not CurrentUri.  Good luck!
>
> Now that that's working, I have a few follow-up questions:
>
> 1. Is there a way to get the album art for the current song?
>
> 2. Is there a way to set the rating of the current song?
>
> 3. When I call GetCurrentTrack, the rating always comes back as 0, even
> if a rating exists.  Should I file a bug?
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Banshee-list mailing list
> [hidden email]
> http://mail.gnome.org/mailman/listinfo/banshee-list
Album art is stored in ~/.cache/album-art/artist-album.jpg. Both artist
and album names have their spaces removed and are all lower case. For
example.. ~/.cache/album-art/mizukinana-angelicconcert.jpg for Mizuki
Nana's Angelic Concert album.

--
Hyperair


_______________________________________________
Banshee-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/banshee-list

signature.asc (269 bytes) Download Attachment