Bug 476073 - Assign Captions behavior in Batch Queue Manager
Summary: Assign Captions behavior in Batch Queue Manager
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Bqm-AssignCaptions (show other bugs)
Version: 8.2.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-25 05:23 UTC by Peter
Modified: 2023-10-25 19:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0
Sentry Crash Report:


Attachments
Assign Captions Fault (2.29 MB, video/mp4)
2023-10-25 05:23 UTC, Peter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter 2023-10-25 05:23:32 UTC
Created attachment 162552 [details]
Assign Captions Fault

SUMMARY
***
Batch Queue Manager contain a new function: Assign Captions (Metadata -- Assign Captions)
Tool-tip help is write this:
If you turn on this options, titles and captions will be cleaned and replaced by the new values,
else old values will be merged with new values.
But the function does not work! Whether it's on or off, digiKam does the same thing: a new image is created (video attached).

OBSERVED RESULT
If it is off: digiKam creates a new image with a new caption.
If it is on: digiKam creates a new image with a new caption.

EXPECTED RESULT
If it is off: old values will be merged with new values
If it is on: titles and captions will be cleaned and replaced by the new values
...and there is no need to create a new image version!

SOFTWARE/OS VERSIONS
Windows: 10
Linux/KDE Plasma: Linux Mint 21.2 (64bit); digiKam is appimage version
Comment 1 Peter 2023-10-25 05:35:18 UTC
An addition:
If the "Overwrite automatically" is turn on in "Behavior -- If Target File Exists:", the end result changes to that extent, no new image file is created, but the original one is always overwritten with the new values, but the new text is not appended to the original text.
Comment 2 caulier.gilles 2023-10-25 05:41:30 UTC
Hi,

This is the expected result. The caption is overwritten from original. The contextual help is clear about this topic.

The behavior of new files created or not is also expected, depending of the Queue settings turned on.

What else ?

Gilles Caulier
Comment 3 Peter 2023-10-25 05:52:55 UTC
"The behavior of new files created or not is also expected, depending of the Queue settings turned on."
 I agree! Yes! This is no fault, it is correct behavior, really! 

Contextual help say it: ...old values will be MERGED with new values. Well, that's not happening.
If it is off: digiKam creates a new image with a new caption.
If it is on: digiKam creates a new image with a new caption.
Comment 4 Maik Qualmann 2023-10-25 06:06:03 UTC
It's definitely not a bug. Whether a new file is created or the old one is overwritten is only determined by the overwrite option under the Behavior tab. This applies to all tools. The clenup and overwrite function only applies to the caption metadata (other languages).

Maybe we should rename it to "Not merge with existing captions". Or invert the function “Merge with existing captions”.

Maik
Comment 5 Peter 2023-10-25 09:57:43 UTC
What this function (Clean up and overwrite) does is a mystery to me. I couldn't find anything about this in the documentation either.
Seems, this function doesn't to do anything useful.
Comment 6 Maik Qualmann 2023-10-25 11:03:40 UTC
Peter, you know that captions are not just only "x-default" -  mostly in English? Captions are localized, you can create captions in all possible languages. When overwritten, these are deleted and replaced by the ones you entered in the BQM.

Maik
Comment 8 Peter 2023-10-25 12:46:07 UTC
(In reply to Maik Qualmann from comment #6)
> Peter, you know that captions are not just only "x-default" -  mostly in
> English? Captions are localized, you can create captions in all possible
> languages. When overwritten, these are deleted and replaced by the ones you
> entered in the BQM.
> 
> Maik

"Peter, you know that captions are not just only "x-default" "
Yes. I known. I use two languages x-default and hu-HU. I understand how BQM works too.
I've tested the "Clean and Overwrite" function in several ways, but the result is always the same, regardless of whether it's on or off. I see no difference.
I'll try again later...
Comment 9 Peter 2023-10-25 12:48:18 UTC
"I understand how BQM works too."
Rather like this: I also understand the operation of BQM.
Sorry, I didn't mean to be offensive :-)
Comment 10 Maik Qualmann 2023-10-25 15:42:08 UTC
A quick test here apparently shows that the overwriting function of the captions metadata doesn't work as intended. I'll test it more carefully later.

Maik
Comment 11 Peter 2023-10-25 15:45:00 UTC
(In reply to Maik Qualmann from comment #10)
> A quick test here apparently shows that the overwriting function of the
> captions metadata doesn't work as intended. I'll test it more carefully
> later.
> 
> Maik

Thank You Maik.
Comment 12 Maik Qualmann 2023-10-25 19:43:08 UTC
Git commit ff2bbcc7a126e2d5ef0d744c337c59031b2cf07f by Maik Qualmann.
Committed on 25/10/2023 at 21:42.
Pushed by mqualmann into branch 'master'.

adjust BQM tool option text and fix overwrite titles/captions
FIXED-IN: 8.2.0

M  +1    -1    NEWS
M  +2    -2    core/dplugins/bqm/metadata/assigncaptions/assigncaptions.cpp
M  +1    -1    core/utilities/queuemanager/manager/actionthread.cpp

https://invent.kde.org/graphics/digikam/-/commit/ff2bbcc7a126e2d5ef0d744c337c59031b2cf07f