Re: [Rhythmbox-devel] Reading songs list



Than you for reply,
I'm trying to learn GTK, and plugin writing by writing CoverFlow
plugin for RB - http://bugzilla.gnome.org/show_bug.cgi?id=516186

At activation I would like to build song list so I could load
necessary covers and build my coverflow UI.

On Feb 17, 2008 1:40 AM, James Doc Livingston <doclivingston gmail com> wrote:
>
> On Sat, 2008-02-16 at 23:23 +0100, Bartosz Wiklak wrote:
> > Hi,
> > I know that by colling
> > rhythmdb_entry_get_string(entry,RHYTHMDB_PROP_TITLE) I can get current
> > playing song title.
> > How can I get list of all songs in library/current playlist?
>
> You can get the library via the following:
>
>         RBSource *source;
>         g_object_get (shell, "library-source", &source, NULL);
>
> or the playing source via:
>
>         RBSource *source;
>         g_object_get (shell, "selected-source", &source, NULL);
>
> Then retrieve the RhythmDBQueryModel for the source
>
>         RhythmDBQueryModel *model;
>         g_object_get (source, "query-model", &model, NULL);
>
>
> A RhythmDBQueryModel is a GtkTreeModel, so you can use normal GTK
> functions to access it. What do you want to do with the list of songs?
> The best way to get the information out depends on what you want to do.
>
>
> Cheers,
>
> --
> "To find an elephant using mathematical techniques, remove everything
> from your search area that is not an elephant. If you find anything,
> then it is, by construction, an elephant, Q.E.D."
>
>
>


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