uniqueHash after File Name Changes and Directory Structure Changes

Ben Bailey bbqbailey at gmail.com
Wed Jan 3 19:09:15 GMT 2018


This is the best way I know of to totally trash your digikam database...

1.  First, tag images along with lots of comments in digikam, for
several thousand photos.

2.  Next, let about 6 months go by, then decide you don't like the image
file names because other programs don't like spaces in the names.

3.  Then decide you want to restructure your directory structures.

4.  Then, after 6 more months, decide you need to run digikam to use it.

5.  Then realize nothing is working because of items 1, 2 and 3 above. 

6.  Realize there's I can't remember enough to restore everything the
way it was.

Dang.

So, write a Golang program that will identify nulls in the relativePath
field in the Albums table and name field of the Images table (done). 
Then write another Golang program that will walk the database structure
while correcting for '_' swaps for ' ' (spaces), then match up the
original files with the new files and location (done). 

Then update the associated fields in the associated tables with this new
information (doing).

But, I have two questions, regarding the 'uniqueHash' in the Images table: 

1. If I just update the Albums:relativePath and Images:name but don't do
anything to the 'uniqueHash', will it work?

2.  If not, how do I correct?

Thanks!

BBQBailey





More information about the Digikam-users mailing list