Re: [Rhythmbox-devel] List entry_types in the rhythmdb
- From: Endre Oma <endre 88 oma gmail com>
- To: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] List entry_types in the rhythmdb
- Date: Sun, 07 Dec 2008 14:14:45 +0100
Endre Oma wrote:
Jonathan Matthew wrote:
On Sat, Dec 06, 2008 at 08:49:37AM +0100, Endre Oma wrote:
Jonathan Matthew wrote:
On Fri, Dec 05, 2008 at 08:01:42PM +0100, Endre Oma wrote:
Hi, I'm new to the list.
I'm new to plugin developing in rhythmbox, but has gotten a
somewhat grip on the queries.
My question is: How do I list or request the types os entries in
the current db? Specifically those that come from a removable
media source.
There is no way to do this currently. What are you trying to do in
your
plugin? It might be easier to find the source you're interested in
using the source list, then get the entry type using the source's
'entry-type' property.
I'm trying to find which podcasts that exist on the removable media.
By looking up the podcasters artist and album and then trying to
find those attributes on the removable media, I hope there is some
way of administering those files on the removable media. The
specific usage is uploading and deletion of tracks.
To do this, I think you'd be best off identifying the target source
through user interaction, perhaps by adding an item to the popup menu
for the source. It's probably difficult to find suitable sources by
looking through the source list.
You might have some difficulty matching up entries in the removable
media source with podcast episodes, as the data for the podcast episode
entry is taken from the podcast feed while the album/artist/title data
for the entry on the removable media will be read from the tags in the
file. These are often completely different. I'm not sure if there's a
good solution to this..
Transferring entries to a removable device is easy enough - pass a list
of RhythmDBEntry objects to rb_source_paste. Deleting entries is
slightly uglier at the moment. You'd need to change the selection
in the source's entry view, then call rb_source_delete. Something like
this:
void
delete_entry_from_source (RBSource *source, RhythmDBEntry *entry)
{
RBEntryView *view;
view = rb_source_get_entry_view (source);
rb_entry_view_select_none (view);
rb_entry_view_select_entry (view, entry);
rb_source_delete (source);
}
Thank you for your advice. I do this in python.
I have a problem how to query the source (without going to the
query_model).
I have seen and tried to use the source.props.entry_type, but when used
in a query it seems that it queries the local database, not the
removable media.
Am I best off using the query_model?
Forget that last post, i was too hasty. I just found out that the album
I thought didn't exist on the removable media, actually did exist. So
much for getting excited.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]