Re: [Banshee-List] Rythmbox libary import



2008/9/30 Paul Lange <palango gmx de>:
> Thank you. It was a bit of work but worked great.
>
> Based on the 0.13.2 Rhythmbox import code I tried to convert it to fit the
> trunk code. I appended the current code.

Excellent!

> Howeversome questions popped up:
>
> * Because Rhythmbox stores its database in a xml-file I'm using a stream to
> read the file. Banshees hacking-file says that I shouldn't use
> System.IO directly (there's also a use of Mono.Unix later). As far as I can
> see there's no stream object in Banshee.IO. What's the preferred way to
> handle this?

Banshee.IO.File has an OpenRead method that's the best thing to use.

> * The old (0.13.2) versions uses a LibraryTrackInfo to store information in
> the database. The trunk Amarok importer uses a
> DatabaseTrackInfo. Does this (through DatabaseTrackInfo track =
> import_manager.ImportTrack (uri);) load song-information (maybe via
> id3-tags) or should I define things like title, artist or album based on the
> Rhythmbox information?

It's a good question - we probably need to read the metadata from the
file itself to pull some that Rhythmbox might not grab (not sure what
that might be, but BPM, others maybe?).  Might work best to grab the
info from the file first, then apply (possibly overwriting a few
values) whatever info we have from RB.

> * Through "UpdateUserJob (...)" I notify the UI about updates. Do I need to
> notify it when the job is done?

No, if you look in ThreadPoolImportSource.cs you'll see its ImportCore
(object o) method calls ImportCore () then DestroyUserJob ();

Please open a bug on bugzilla and attach your work there, and we'll
continue the discussion there too.  See
http://banshee-project.org/contribute/write-code/ for more info.

I'm really glad you dived in, thanks!

Gabriel


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