hi,

On Wed, Jul 3, 2013 at 3:50 AM, Kevin <kmg...@bigpond.com> wrote:

> **
>
> I have developed an Android-based image viewer that is driven by the dt
> database. I have a BASH script that exports changed images to JPGs, these
> JPGs and the dt database are then (clumsily) transferred to the mobile
> device.
>
>
>

nice :)


> My problem is when I have created duplicated images.
>
>
>
> I have examined the database and found that there is a second "images"
> table row which is tied to the "original" row via the "group_id" column.
>

iirc, groups came after duplicates, so the group id is just an additional
thing that happens to group duplicates together. the mechanism to detect
and handle duplicates should be independent of that.

dt_image_path_append_version() in common/image.c creates the _01 _02 ..
version suffix by collecting all images with the same filename in this same
folder and enumerating them by image id.


>
> The following is for one particular image:
>
>
>
> id |group_id|deleted?
>
> 5856|5856 |no
>
> 5885|5885 |yes
>
> 5886|5856 |no
>
>
>
> There are three xmp files:
>
>
>
> IMG_2622.CR2.xmp
>
> IMG_2622_01.CR2.xmp
>
> IMG_2622_02.CR2.xmp
>
>
>
> By modifying the images the "_01" xmp file appears to be related to the
> "deleted" image.
>

it's weird that you permanently have a deleted image in your database. this
should be a temporary flag to avoid race conditions (drawing an image while
a bg thread deletes it).


>
>
> Q: From the database, how can I tell which "xmp" file relates to which
> "images" row?
>

see function mentioned above.

hope that helps,
 jo


>
>
> Thanks in advance,
>
> Kevin
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> darktable-devel mailing list
> darktable-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/darktable-devel
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel

Reply via email to