Problems updating photos



I've been working on bug 521196 (Conduit does not sync F-Spot photos
with changed tags/captions) and I've found some problems related with
the sync manager.

First, in one way syncs the modified items are treated as new ones,
and put to the sink with the overwrite flag set to False. Therefore in
the sink, _upload_photo is executed instead of _replace_photo.

So, I've been testing with a two-way sync. The patch I made
implementing _replace_photo for Picasa works fine, it applies in
Picasa the changes made in f-spot.

But I've noticed that DeltaProvider sometimes finds non existent
modifications. Consider the following two-ways sync case:

F-spot (1 photo) <--> Picasa (empty)

1.- Execute Synchronize group, and the photo from f-spot is correctly
uploaded to picasa.

2.- Right after the first sync I execute again Synchronize group. No
change has been made in any end of the conduit but, surprisingly, a
modification is detected in Picasa. The reason is that after the first
sync the mapping db has something like this:

sinkUID: PicasaTwoWay... sinkDataLUID: 5223... sinkDataMtime: <empty>
sinkDataHash: <empty>,

and the second sync prints this log:

Modified: Actual:UID:5223268002402587890 mtime:2008-07-15 15:47:33
hash:1487227422 v
              DB:UID:5223268002402587890 mtime:None hash:

mtime and hash are different so, DeltaProvider thinks there's been a
modification in the photo and sent to f-spot.

I think these two problems can afect the update operations of other data types.


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