Re: [Shotwell] How to delete a photo from the shotwell databse



Hi,


On 03/04/18 01:24, Larry Bradley wrote:
However, there are other tables that refer to photos (eventtable,

Eventtable is referenced from phototable: Eventtable.id <=> Phototable.event_id.

tagtable) that will need to be updated. Can someone tell me how Shotwell
deletes entries in these tables?

Tagtable.photo_id_list contains a list of images associated with that tag. For photos they look like this: thumb0000000000000cc1 – i.e. "thumb" + the hex representation of the photo id. Or in printf-terms: ("thumb%016x", phototable.id).

For videos it is the same (IIRC), though with "video-" instead of "thumb" and from the videotable.id.

For example, the tag table. Given the photo id, I know the thumbnail
name. The problem is to find that name (eg thumb00000007f) in the tag
table's photo_id_list. Also, I need to find the photoid in the list as
well, to delete the Folders entry.

Any help on deleting entries from the various shotwell tables, given a photo id, would be appreciated
Thanks

Other things... just noting from looking at the database:
- There is a link phototable.id <=> eventtable.primary_source_id as well. I guess it either sets the date of the event and/or thumbnail. - Reference from backingphototable: backingphototable.id <=> phototable.editable_id.

There is a tombstonetable which I cannot quite figure out does or how it is referenced....

The saved search table I have not looked at so much... but also seems simple, though not needed for your application, I guess.

Hope that helps.

~Jørn




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