On Mon, 2008-03-17 at 14:43 -0500, Gabriel Burt wrote: > 2008/3/17 Bertrand Lorentz <bertrand lorentz gmail com>: > > On Sun, 2008-03-16 at 23:56 -0500, Gabriel Burt wrote: > > > 2008/3/16 Bertrand Lorentz <bertrand lorentz gmail com>: > > > > After some looking around in the codebase, I'm having difficulties to > > > > find the replacement for what was "Globals.Library". It was used for two > > > > things : > > > > - Load the bookmarks only after the Library has finished loading. > > > > - Fetch the TrackInfo corresponding to a track_id. Bookmarks only work > > > > for tracks that are in the database, so that would be now > > > > "DatabaseTrackInfo". > > > > > > You can access it via ServiceManager.SourceManager.Library. This > > > should definitely be part of the not-yet-created documentation for > > > creating Banshee extensions. > > > > Thanks for the tip. > > > > I still haven't been able to find a way to retrieve the > > DatabaseTrackInfo object corresponding to a TrackId (it was > > Library.GetTrack() in the old codebase). It feels like I'm missing > > something... > > > > Do I need to query the database directly, or is there a way to do this > > with TrackListDatabaseModel ? > > > > Sorry for cluelessness... > > No problem at all. So, TrackListDatabaseModel is really tied to > CoreCache, the filtered/sorted temporary view of the songs in whatever > Source its tied to (Library, a playlist, etc). Since you should be > able to bookmark anything (eg especially podcasts), which are in > various PrimarySources (or will be soon), I think the best way to get > the TrackInfo object out is to do: > DatabaseTrackInfo.Provider.FetchSingle (int trackid); Yes, exactly what I needed ! Thanks ! It now compiles, installs and basic functionnality is here. Just a few "minor" bugs : existing bookmarks are not loaded on startup, and removing a bookmark does nothing. As soon as those are fixed, I'll upload a patch to Bugzilla. But don't hold your breath, it might take me a few days... Cheers, -- Bertrand Lorentz <bertrand lorentz gmail com> > http://flickr.com/photos/bl8/ <
Attachment:
signature.asc
Description: This is a digitally signed message part