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



On 7/11/07, Christopher Friedt <cfriedt visible-assets com> wrote:
Hello,

I'm about to start writing a different sort of sync plugin, and I'm just
wondering exactly what synchronization resources are already in the
banshee codebase.

Specifically, does the synchronization support forward syncs, backward
syncs and mixed syncs? (somewhat like rsync)

I may misremember something here so someone feel free to correct me,
but the last time I looked at the sync code, what it did was this:

1) Make a list of every track on the DAP (the dap plugin does this)
2) Add all the songs you want to save to the list, either the new ones
you just added or the whole library if you are syncing the whole
library
3) Add all the songs you want to remove to a different list
4) Save everything in the lists by calling back into the DAP plugin
(Synchronize() method)

Synchronize depends on the plugin, but generally it looks at any songs
in the remove queue, deletes them, then adds to the DAP all the tracks
in the track list that aren't already on the DAP.  So I guess this is
like a forward sync with deletes.  I'm not sure if any plugins copy
tracks from the DAP back into the banshee library.

-Bob



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