Bug 435920

Summary: Unique Parameter not working correctly by large collections
Product: [Applications] digikam Reporter: Thomas Bach <Thomas.bach>
Component: AdvancedRename-dialogAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 7.3.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 7.3.0
Sentry Crash Report:

Description Thomas Bach 2021-04-19 16:31:45 UTC
I try to rename some Pictures with the unique parameter. By a large collection, all pictures are marked with a unique numberr instead that the DateTimes are different. Cannot find out, what the border is. I can only see, that it works perfectly if i use a small collectioneand fails, if i use a large collection.
Comment 1 Thomas Bach 2021-04-19 16:34:20 UTC
Additional Info:

Seems, it is a problem of the file name length. First, i changed all Picture with the Number flag to get a uniqe filename. Then, if i use the unique parameter, all files are extend with the unique attribute
Comment 2 Maik Qualmann 2021-04-19 17:53:58 UTC
The {unique} parameter is used to make a value from the metadata or database unique, not to generally append a counter.

Hello{unique:2} does not result in Hello_01

Hello-[meta:Exif.Photo.DateTimeOriginal]{unique:2}-Test results in
Hello-2021:04:20 20:10:15_01-Test if the date is the same

(Under a Windows file system, the ":" is replaced by "_", this example is from Linux)

Maik
Comment 3 Thomas Bach 2021-04-19 18:21:34 UTC
Ok. Last workaround:

I use [meta:Exif.Photo.DateTimeOriginal]{unique:4} to rename the files. After that, i can filter with *_????.* (They are also some files not as jpeg) and find the duplicates. Not the perfect way. I must rename the files many times and it needs a lomg time.