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



Hi there,

I'm not familiar enough with rsync to know how to compare Banshee's DAP
sync'ing with rsync, but I can provide some information:

There are two types of sync:
* Automatic sync.  This queues all tracks for removal, and queues all
tracks in the library for addition.  Then Save(library) is called, which
takes care of any necessary transcoding, and then passes the handling to
the Dap-specific Synchronize method which actually does the remove and
adding.
* Manual sync.  This is when the user wants to control what's going on.
User can delete tracks (which go into the remove queue), and add tracks
from the library to be later sync'd.  Then the user must do a manual
sync, which simply calls the Save() method (transcode happens, then
device-specific Synchronize which does remove/add).

Code: banshee/src/Core/Banshee.Base/Dap/Dap.cs: Save() methods
banshee/src/Dap/Banshee.Dap.{Type}/{Type}Dap.cs: Synchronize() method
(most Dap's implement a very similar version).

As for the reverse, we've set up an IImportable interface so that any
source can be made to drag tracks elsewhere.  I believe both MassStorage
and Ipod have this implemented; Mtp has a hackish implementation due to
it's nature not agreeing with the Banshee internals.  There's no
implementation of a synchronize that pulls tracks from the device; only
manual importing.

What do you have planned?  I'm curious :)

Cheers,
Patrick


On Wed, 2007-07-11 at 17:34 +0200, Christopher Friedt 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)
> 
> That would save me a bit of time if I could use something already in place.
> 
> If there aren't definitions of these already in the main codebase, then 
> I could probably try to write up something in the main codebase before 
> writing my plugin.
> 
> ~/Chris
> _______________________________________________
> Banshee-list mailing list
> Banshee-list gnome org
> http://mail.gnome.org/mailman/listinfo/banshee-list




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