Re: [Rhythmbox-devel] Python plugins as Sources



Adam Zimmerman wrote:
On Tue, 2006-14-11 at 17:54 +0100, Tom Parker wrote:
Any pointers on where to find more detailed information, or at least more detailed examples?
If you check out the CVS version of rhythmbox, the Magnatune plugin
seems to fit what you need. It's pretty simple so far as the adding
songs to a source bit goes. You can also look in the mailing list
archives from back in May when I was first writing it, and getting a lot
of help.
Thanks! That's a lot of help. I've now gotten as far as being able to 
add songs correctly to my new source, but I've still got a few problems 
which I can't see a solution to from the Magnatune sources
1) I'm aiming towards being able to fix 
http://bugzilla.gnome.org/show_bug.cgi?id=328526 ("Add metadata cache 
for audio players"), which means I need to get hold of entries to store. 
I'm using add_uri_with_type from the db to avoid doing the heavy lifting 
of setting artist/title/album myself, but this means I can't seem to get 
the entry references back. entry_lookup_by_location doesn't appear to be 
doing the right thing. Anything I hand to it gets me a None back. I've 
tried this both from my plugin, and from the python console with a url 
of a file not on the media player device. I've tried both with and 
without "file:///" stuff on the beginning.
2) Couldn't seem to get the debug stuff working. Ended up hacking in my 
own debug function which looks like the following:
def debug(*args):
	print >>sys.__stderr__,"gps err: ",args

Using rb._debug did nothing at all... and I've just realised why. D'oh.. Should have switched on the -D flag.
Thanks for the help, I should hopefully have a working version of this 
to show soon enough....
Tom Parker


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