[Banshee-List] Some questions about the DBus interface



Hello,
I'm in fact new to dbus
I'm trying to get song information via dbus in python

I first made sure the dbus really worked:

import dbus
bus=dbus.SessionBus()
p=bus.get_object("org.bansheeproject.Banshee","/org/bansheeproject/Banshee/PlayerEngine")
print p.GetVolume()

And it really worked

I then refer to this page:
http://banshee.fm/contribute/write-code/dbus-interfaces/

there is

[Interface("org.bansheeproject.Banshee.Tracks.Track")]
public interface ITrackInfo : IBasicTrackInfo
{
    string DisplayArtistName { get; }
    string DisplayAlbumTitle { get; }
    string DisplayTrackTitle { get; }
    string DisplayGenre { get; }

    int TrackNumber { get; }
    int TrackCount { get; }
    int Year { get; }
    int Rating { get; }
}


So I guess I can do this:

import dbus
bus=dbus.SessionBus()
t=bus.get_object("org.bansheeproject.Banshee","/org/bansheeproject/Banshee/Tracks/Track")
t.GetYear()

But it results in some "unknown method" error
In the program D-Feet
I can't find any object with a path of
"/org/bansheeproject/Banshee/Tracks/Track" ,either

What's more,
If I want to do this using p.GetCurrentTrack() in the first python code example
It only returns one dictionary entry with key "URI"
That is, I can only access p.GetCurrentTrack()['URI']
There are no keys named 'name', 'artist', or 'album'


My gnome-applet-music-2.5.1 can control the playing of Banshee.
It can also monitor the current progress of the song
But it can not display any information of the song as it used to be able to.
I wonder if these are the same issue.

Did I misunderstand something?
How can I fix this?

Thanks a lot.

my system information:
linux kernel 2.6.34.7-66.fc13.x86_64
Fedora 13
Gnome 2.30.2
Banshee 1.8.0
dbus-1:1.2.24
dbus-glib-0.86-4
dbus-python-0.83.0
ndesk-dbus-0.6.1b
Python 2.6.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]