-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Index: More accurate and resilient handling of related files and photo stacks #1823
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
Seems related files were intentionally skipped to fix #394 two years ago. |
Related files (e.g. JPEG, XMP, ...) should now be correctly added to existing stacks if the main file (e.g. HEIF, Video, RAW, ...) was stacked previously. Please help testing to make sure we did not forget to cover an edge case! 👍 |
Did you previously add it, so that that the index already contains an entry? Logs say updated, not added. |
Thanks for testing, looks like it's indexing with two workers this time. Concurrency is hard. Going to take another look tomorrow. |
Tested again.... this is how it looks on my side with a clean index and existing sidecar JPEGs:
The log message index: stacked main heif file debug/IMG_4478.HEIC has 1 related file is important here. Once again with a clean index after removing the sidecar JPEGs:
Whatever I do, there are 4 files visible in the files tab after initial indexing. Can you repeat the test with debug mode enabled? |
Another test with a clean index,
Works every single time 🙄 |
I deleted the photos/sidecar files, re-indexed, and performed the test again with debugging enabled:
This is a second indexing attempt with complete rescan checked:
I tried indexing two more times and got the same results. It keeps flagging the photo as deleted. |
This commit also adds initial HDR flag extraction from metadata.
If it does not work with this, I lose faith. |
When unstacking, make sure the photo Name (see Settings tab in photo edit dialog) does not match the file Name of the file you want to unstack. It then does not get renamed and related files should now be unstacked together with it. |
This change will also extract and index the HDR flag from HEIC files for easier debugging, see Files tab. |
OMG, this is starting to escalate! Taking a look tomorrow. |
Does it work with a clean index and the latest preview image? |
Oh I see, a new preview image was released while I was in the middle of testing this. I'll pull it, try again, and report back. |
It's expected that the PRIMARY files remains in the stack as you can't unstack it. Now if you unstack the HEIC file for it, this may cause a problem in that the newly created JPEG has the same hash as the one that remains in the stack because it's the primary. So the fix may simply be to disable the buttons. Somehow related to what I wrote in december as it's not really possible to know where a JPEG really originates from until after the fact (when you compare hashes for example). This is all getting super complicated now. |
Am I right in thinking that the original problem - the second JPEG was not visible on the Files tab - is solved? Do you still need to unstack the other HEIC now? |
220105-c5301a68-Linux-aarch64 The first unstack/restack test worked fine. Restack/reindex log
The second unstack/restack test, it broke again. Restack/reindex log
|
This original problem is indeed solved. Thanks so much for fixing that! This new stacking problem just came about because I thought I'd give stacking a thorough testing for you. My bad 😆 |
This sounds like a reasonable solution to that problem. If the only one the user can unstack is the secondary photo, then they can't make that mistake anymore. 👍 |
@graciousgrey This problem with broken re-stacking, presumably created by the changes here, still exists: #1823 (comment) If we need a separate issue for it, let me know and I'll create one. |
I see there were some commits yesterday. @lastzero If those were meant to address the broken re-stacking mentioned above, let me know and I'll give it another test. |
Can you test with a clean index and today's stable release again? If the issue persists, please create a new issue for it incl test files 👍 |
Seems to be fixed 👍 The difference I noticed in this release is that both images were marked unstackable instead of just the one I unstacked. To re-stack them, I had to set both images back to stackable, and then they were properly stacked without one of them going missing like before. Thanks! |
What does not work as expected?
Background
When capturing an HDR image, my iPhone captures both the HDR version and standard version at the same time as two separately named HEIC photos with otherwise identical metadata.
Bug
When these two photos are uploaded, jpegs are generated in the sidecar directory but only one of those jpegs gets shown in the Photoprism files UI. I have prepared a set of files to reproduce this (see the repro steps below for the download).
Workaround
Re-index with a "Complete re-scan" two times (re-indexing without a complete re-scan does nothing). The first re-index will generate a yml file for the jpeg that is missing from the UI, and the second re-index will finally cause the jpeg to show in the list.
Screenshots

Here is the files list after I upload and index the two photos the first time:
Here is the sidecar directory at this point, note the missing yml file:

After re-indexing with a complete re-scan, the files list in the UI has not changed, but the sidecar directory looks like this now:

Now, one more re-scan is required. After two complete scan re-indexes, the files list finally updates:

How can we reproduce it?
Steps to reproduce the behavior:
What behavior do you expect?
All sidecar files should be properly created and indexed with the first indexing.
What version you are using?
211215-93b26f19-Linux-aarch64
The text was updated successfully, but these errors were encountered: