Skip to content
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

Additional photo location unit tests #918

Merged

Conversation

kvalev
Copy link
Contributor

@kvalev kvalev commented Jan 18, 2021

I had a folder with non-geotagged photos, where the location was estimated based on the folder's name. After manually geo-tagging them, the location was not set after re-indexing the folder, because estimated locations are not allowed to be overwritten, which was probably not intended.

Add few additional unit tests to make sure the photo location is set correctly.

@kvalev kvalev force-pushed the kvv-overwrite-estimated-location branch from 4528f67 to e2720d3 Compare January 18, 2021 22:29
@lastzero
Copy link
Member

Should use our source priority lookup table... See title and description.

lastzero added a commit that referenced this pull request Jan 19, 2021
@lastzero
Copy link
Member

Let us know if these changes work for you :)

@kvalev
Copy link
Contributor Author

kvalev commented Jan 19, 2021

Oh, I didnt see that you pushed a fix already. My solution is largely the same, but it allows to overwrite an existing photo location (if for example you correct the geo information for an image directly in the exif data). And there are few more unit tests as well.

@lastzero
Copy link
Member

The location should be updated automatically after lat / lng have been changed. If this is not the case, that's a bug? Of course depending on the specific API / function you use for this. Make sure to also update the location source so that PhotoPrism knows this is a manual change. Otherwise, you may not be able to overwrite existing metadata.

internal/entity/photo.go Outdated Show resolved Hide resolved
@kvalev kvalev changed the title Allow overwriting estimated locations Additional photo location unit tests Jan 19, 2021
@lastzero
Copy link
Member

lastzero commented Feb 5, 2021

Thank you very much & sorry for the wait! 👍

@lastzero lastzero merged commit c27e809 into photoprism:develop Feb 5, 2021
@kvalev kvalev deleted the kvv-overwrite-estimated-location branch February 5, 2021 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants