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: Edit metadata #5066
feat: Edit metadata #5066
Conversation
Thanks for the PR! I think the general direction is looking good. I see you're writing to a separate sidecar file rather than using the one that is (maybe) already there. Is there a particular reason for that? |
Yeah I don't want to override user sidecars, the goal is only to correct the graphical view and not to change the user sidecars. But if you think it's a better idea to use the sidecar of the user I can do it this way it will be easier! |
For now the server part is ready for change date and position for singular asset or in bulk. For now it overide the preexisting sidecar (but create a save of the previous one), I assume that if a user changes the metadata he also wants to modify his sidecar. I don't see any case where that wouldn't be the case. I need extensive testing also I will start the frontend part |
🤩 Exactly the feature that I was looking for! |
Select on the map is the best way to go, but my skills in frontend are limited so I need to figure out how to do it ! |
It's so cool to see that this is in development. Would you consider also capturing and saving the (existing, editable) description line to the sidecars? |
Maybe in a future PR, I think there is enough change for this PR ! I am focusing on clear the code and writing test and docs for now ! |
creationDate: event.detail, | ||
}, | ||
}); | ||
notificationController.show({ message: 'Metadata updated please reload to apply', type: NotificationType.Info }); |
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 we just change the asset
var and let svelte handle this? (cc @jrasm91 / @alextran1502 - maybe not because that var is handed down from the timeline?)
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.
I don't remember what used to be here, but I think it's need fixed now?
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.
My intent was rather than asking the user to reload the page, can we just update it in place?
web/src/lib/components/photos-page/actions/change-localization.svelte
Outdated
Show resolved
Hide resolved
I just want to thanks @danieldietzler who save this PR from the mess I did during the rebase ! I'm going to work to migrate the writing process inside a job |
e9b5954
to
ababa16
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.
The server stuff looks good to me. I made a few changes:
- moved write tags repo method to the metadata repository (instead of the asset repository)
- renamed the job to sidecar-write
- refactored the logic to queue the write job into a private method since it is used in both the single update and bulk update methods
- Added some e2e tests for writing gps
- Added some unit tests for the
handleSidecarWrite
method
The web could probably still use a little work. I made the following changes:
- Removed if/else blocks and instead always render the same component (with conditional props instead)
- Updated the new modals to extend the confirm dialogue instead of copying all it's internals
- Updated the dropdown list to show timezone names and offsets (although there are a lot, maybe too many 😄)
- Updated the timezone to use the custom select, which required a few changes to make its position fixed, instead of absolute
A few things to do (now or later):
- listen to websocket event for metadata update
- update the UI for the detail panel to look like google photos
- custom date/time picker instead of the system one
- timezone typeahead filter
493cf93
to
72fc506
Compare
Hi @YFrendo I and Jason was testing the PR last night and realize the websocket mechanism can trigger rerendering the timeline which is what we don't want, so we've decided to resort back to display a notification and let the user refresh the page to see the upload |
Hi @alextran1502 ! Should I revert everything related to the Websocket ? Where is the issue with the rerendering of the timeline ? Genuine question just to understand where is my mistake. |
@YFrendo Yes you can revert the websocket changes. It is not your mistake but how the update works on the timeline. You can try to upload a few assets, and you can see the placeholder get rendered on the timeline even though the photo thumbnail hasn't been processed yet. We specifically don't want to have websocket's event rerenders the timeline because during the bulk upload action, it will constantly shift things around and make the timeline unusable. |
Everything related to the websocket is now revert, I tried to update the display of the asset when you update it but it create some mess with the timezone. |
This version is without websocket, but can we keep websocket for :
Or is it a more global issue around the websocket inside this context |
This reverts commit 14bcb9e.
This PR is "feature complete"
You can:
In order to do this the server create a sidecar file with 'exiftool-vendored', if there is already a sidecar the following value are overwrite if needed :
The metadata extraction job is run after this in order to actualize everything with the new data.
The Update of the frontend go through the websocket to update the front dynamically
The design of the frontend is very basic but I think it's the best I can do !
Screenshot
Change date:
Enregistrement.de.l.ecran.2023-11-29.a.13.15.07.mp4
Change location
Enregistrement.de.l.ecran.2023-11-29.a.13.16.34.mp4
Change in batch
Enregistrement.de.l.ecran.2023-11-29.a.13.17.43.mp4
Future improvement
But this can be add later in other PR!