-
Notifications
You must be signed in to change notification settings - Fork 1.2k
FR: LUA API: add load_sicecar for dt_lua_image_t or make dt_lua_image_t.sidecar writeable #16599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm a little concerned about the safety of doing this. Applying a sidecar to an undeveloped image in lighttable is one thing, but going back and forth between different sidecars for the same image seems to be a recipe for database corruption. @jenshannoschwalm , @TurboGit thoughts? |
I agree @wpferguson , the idea of reloading full history stack might be appealing but ...
|
Question for my personal understanding regarding your concerns about db integrity, which I higly appreciate: How does automated reloading of history stack from a git-reverted sidecar file differ from loading a sidecar file via lighttable -> history stack module (like one that was backed up in the past or downloaded from public resources like pixls.us). |
I agree that is should be the same, my concern would be: How can we ensure integrity? We have database backups for safety, are we sure that by roll-back to an old version we have the corresponding sidecars? If writing to git fails for some reason, are we sure that available sidecar is valid and represents database? And how could we test that? Or - if dt database has a problem, can we make git aware of that (or don't we need to) |
I believe that the apply sidecar function's intent is to provide an investigative tool:
This FR is wanting to use the sidecar files as a form of "snapshot" and maybe apply sidecars multiple times. Some of the questions/problems that I can think of:
The designed data flow in darktable is I think this issue is much larger than just an API change. I think there is a HUGE amount of database interaction involved in multiple applications of sidecars to edited images that is only going to be understood with a LOT of testing. And, no matter how much we test, somebody will do something we never that of and it will be catastrophic. |
Thanks for your input so far but I believe, your certainly legitimate concerns regarding data integrity are out of the scope of this feature request and should be discussed in a separate stream.
Anyhow: the integrity issue remains the same and as mentioned - imho - should not be part of this feature request. |
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue. |
Coded up image:apply_sidecar(). I don't think I'd try it in darkroom, but it works fine in lighttable. Here's the updated src/lua/image.c |
2025-02-04.21-09-27.mp4Integrated and made a few tests in my testing environment - works as expected. |
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue. |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
I am currently working on a sidecar / XMP history feature within darktable-git-annex (https://github.com/micharambou/darktable-git-annex).
The idea is, that the user is able to go back and forth between previous versions of git-tracked sidecar files of an image and the resulting visual changes shall become visible within lighttable view immediately. However, in it's current state there is no possibility to trigger a reload of sidecar from within DT LUA API the same way as the user is able to do so from within history stack module.
Describe the solution you'd like
or
Alternatives
no known alternatives or workarounds that do not require user interaction
Additional context
checkout sidecar_history branch in githttps://github.com/micharambou/darktable-git-annex/tree/sidecar_history
merged as experimental opt-in feature in main (enable in preferences)
The text was updated successfully, but these errors were encountered: