Re: [Banshee-List] banshee synchronization code (in-depth)



On 7/11/07, Christopher Friedt <cfriedt visible-assets com> wrote:
Just out of curiousity, does the existing code within the DAP plugin do
a hash on each of the songs that it pulls from the device (or, equally,
select all the hashes from an existing DB on the DAP)?

I can only speak for the Karma plugin, which does not.  It merely
does a linear search through the database, using a string compare on the
metadata to know whether a song is on the player.  Look for
TrackExistsInList() in the core code; this is what Karma and whatever DAP
plugin I based it on was using.

Note that a plain hash may not fully suffice, because the ID3 info may
be different even though the songs are the same.  The Karma database
stores an "rid" which is an md5 of portions of the file without the tags.
Our low-level library, libkarma, can compute and use these, but I never
bothered to add explicit support in the banshee plugin.

This could be quite a bit of work, but I don't mind. It will be a good
project to learn a bit about C# and brush up my SQL too.

Good luck!



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