Re: [Rhythmbox-devel] Populating source list...
- From: "Jonathan Matthew" <notverysmart gmail com>
- To: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] Populating source list...
- Date: Sat, 3 Nov 2007 14:59:43 +1000
On 11/3/07, Robert Connolly <rob_connolly mailshack com> wrote:
> Hi all,
>
> I'm trying to add entries to the list in a browser source. This is what
> I have so far:
>
> db = self.shell.props.db
> entry_type = db.entry_register_type("NJB:List_Entry")
> entry = db.entry_new(entry_type, "njb://song/%i" % count)
> # set properties
> db.set(entry, rhythmdb.PROP_TITLE, tag.GetStringValue())
> # ... set rest of properties
> db.commit()
>
> That seems to work, I don't get any errors, but nothing shows up in the
> Browser listing.
You need to use the entry type you pass to the source's constructor.
The browser source class, of which your source is a subclass, creates
query models (which select entries to be displayed in the source)
using the source's entry type property.
Also, you probably want to include something unique to the device in
the entry URI, otherwise you won't be able to handle multiple devices
at the same time.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]