-
Notifications
You must be signed in to change notification settings - Fork 239
Read creation date from XMP sidecar too #841
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
Conversation
|
Thank you for your addition! There as a bigger MetadataLoader.ts change with one the latest PR that conflicts with the PR. Can you please resolve the conflict? |
|
Rebased. The line endings in MetadataLoader.ts seems to have changed to CRLF by mistake meanwhile, hence the added commit to fix those. I don't like stealing the authorship this way, so please consider applying the fix for line endings on your own and I can rebase again. Not sure why the test fails. BTW master seems completely broken to me now, complaining about nonexistent column |
That was probably my mistake with CRLF. I switched between WSL and pure Windows. I did the other big PR with MetadataLoader. Thanks for fixing it. This includes the new optional value and column creationDateOffset, which you should also read from the sidecar if available. The tests as such should not be broken, although there is a problem with SearchManager tests that I'm trying to reproduce locally. @martyone: Perhaps you could add a test asset and a test in MetaDataLoader.spec.ts that will show that your commit is working as intended. I think there are currently zero tests about sidecar data. |
a9b515a to
dff5097
Compare
|
Expanded to other time values as well. I had some sidecars where some of the namespaces were not used, which threw exceptions in expressions like I am not sure whether it was really that one of those namespaces were truly missing from the sidecar or it was the case that "xap" was present instead of "xmp" (an issue I only discovered later) but anyway I think it's good to support minimal sidecars too. I do not see |
|
Fixed linter issues |
Sounds like you need a rebuild of the whole project in your work space ¯_(ツ)_/¯
Sure. TDD is often hard, but in the end it saves you time, even if you have made a simple change. :) If you care, I would suggest:
I wouldn't mind helping with that if you can post some test-data here. Regards :) |
Yeah that would be nice - I wasn't able to run the tests, so please see the WIP commit. The expected JSONs are missing. I thought about preparing assets addressing particular issues to test, but after all I think its better to work with real world data (as closely as possible), each of which may suffer from more than one issue, so I think it's better not to aim for descriptive test case name etc. and simply iterate over all and check for stable results. |
|
@martyone added a PR to your branch that finalizes the nice test-material and tests you prepared: Did not rebase, so there is still a bit of work left. Also borrowed a bit of code from: #839 for fixing the keyword reading. |
These will be needed from the loadVideoMetadata as well.
Thanks grasdk for providing the .json files! Co-authored-by: grasdk <[email protected]>
|
@grasdk Rebased, squashed your JSONs addition with my commit. I omitted the fixes for keyword reading as those seem to be already in master. Sadly I cannot test it right now. I did just blindly edit it. Maybe you could test it? It would be nice to have it merged soon - rebasing/resolving conflicts in these has been quite painful and I did it a number of times already. |
|
You moved some functions to Utils.ts. Understandable, but it doesn't build. I pulled your latest branch and fixed that locally, but currently have trouble running some of the tests from the last merge. Will update tomorrow I think. |
|
@martyone . Made another PR to your branch: martyone#2. The tests run on my machine after a complete rebuild: |
|
I had to move it somewhere during the rebase to be able to accommodate my rebased commit to use that also from Merged your commit, thank you. |
|
@martyone what's your take on sidecars in general:
I believe I read a comment from @bpatrik in favor of option 1. I think I agree, but in that case I will do some extra work after this is merged, so all the other fields relevant to pigallery2 can be read from sidecars. |
|
@grasdk I would prefer option 4. Option 1 would be good for someone willing to hide some of the embedded metadata, which I consider a special case, which could be also achieved with option 4 by clearing the respective fields in the sidecar (field present, value empty). So option 4 seems more versatile to me. I don't really see a use case for options 2 and 3. |
|
I would prefer option 4 also. In practice not all metadata gets written to sidecar immediately. I think most metadata could by synced by exiftool, but I'd prefer not to have to go through that extra step. |
I also prefer 4. Reasoning: There is almost always some data in the embedded, so lets use it if exists. i do not see a reason why not. If you take the effort to create a sidecar, then lets use whatever is in there. |
|
Thank you for all this effort. |
Related to issue #682 . I was dealing with inconsistent video time handling among cameras and apps I use to manage photos. After all I resorted to fix the times manually and store the corrected times in sidecar files.