Re: [Rhythmbox-devel] rhythmdb entries
- From: Ron Croonenberg <ronc depauw edu>
- To: Jonathan Matthew <jonathan d14n org>
- Cc: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] rhythmdb entries
- Date: Fri, 01 Jan 2010 21:43:52 -0500
Hi Jonathan,
thanks for the link, I read C better than python. (I found another link
that i could use to 'derive' them from too;
http://library.gnome.org/devel/rhythmbox/unstable/RhythmDB.html#RhythmDBPropType)
thanks,
Ron
Jonathan Matthew wrote:
On Thu, Dec 31, 2009 at 12:27 PM, Ron Croonenberg <ronc depauw edu> wrote:
I am trying to access the rhythmdb, I checked the "plugin writing guide"
but the only thing I can find is the following snippet:
%<
for row in mysource.props.query_model:
entry = row[0]
print db.entry_get(entry, rhythmdb.PROP_TITLE)
%<
is there a document that shows how to use the rhythmdb?
Not really. The C documentation
(http://library.gnome.org/devel/rhythmbox/unstable/ch04.html) is
incomplete but it might help a bit for the parts that translate
directly to python.
For accessing all rows in the db, do I just loop through it and than get
data out of an entry by using something like:
'db.entry_get(entry, rhythmdb.PROP_TITLE)' , like in the above snippet?
I see there is a rhythmdb.PROP_TITLE, is there also a rhythmdb.PROP_ARTIST,
rhythmdb.PROP_ALBUM, etc etc (is there a list of these?)
The available properties are defined in rhythmdb.h:
http://git.gnome.org/browse/rhythmbox/tree/rhythmdb/rhythmdb.h#n150
When accessing these in python, you remove the 'RHYTHMDB_' prefix,
since they're already in the 'rhythmdb' module.
Alternatively, run 'filter(lambda x: x.startswith("PROP_"),
dir(rhythmdb))' in the python console.
_______________________________________________
rhythmbox-devel mailing list
rhythmbox-devel gnome org
http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
--
==================================================================
main(p){printf(p,34,p="main(p){printf(p,34,p=%c%s%c,34); }",34); }
==================================================================
Ron Croonenberg |
| Phone: 1 765 658 4761
Lab Instructor & | Fax: 1 765 658 4732
Technology Coordinator |
|
Department of Computer Science | e-mail: ronc DePauw edu
DePauw University |
275 Julian Science & Math Center |
602 South College Ave. |
Greencastle, IN 46135 |
==================================================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]