-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(server): Handle sidecars in external libraries #14800
Conversation
7af5081
to
d0bb59f
Compare
400e4e0
to
a542e87
Compare
a542e87
to
8868d38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we currently handle this mechanism before this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help explain the logic changes in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the library service I now queue a sidecar discovery job when an asset is updated. That job will queue a metadata extraction if the sidcar discovery suceeds or skips, not if it fails. Therefore, if it was successful in finding a change in sidecar info, it will perform a metadata extraction and not skip that step.
Badly and it was very broken. Only file.jpg.xmp was picked up in an external library, not file.jpg. Also, it was impossible to refresh a sidecar of any given asset without running the sidecar discovery job for all assets in the db. In this PR, external assets are handled exactly like normal assets without duplicating code. |
Recent improvements in sidecar handling in uploaded assets haven't propagated to external libraries before now.
With this PR, we correctly handle both file.jpg.xmp and file.xmp.
The key part is that we force a sidecar update for every metadata extraction of an external asset.
e2e tests added
A limitation that remains is that we don't automatically import changes when only the xmp is changed. The user will have to manually initiate a metadata refresh of the affected assets when this happens. This will be handled in the future by the planned asset file handling rework, but this depends on the kysely migration :) With the new asset file rework we will only re-discover xmp files when we actually need to.
This PR is a prerequisite for #14456