Backend: Set PlaceID and PhotoCountry for unknown locations
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
65f47a5db4
commit
404682b730
1 changed files with 2 additions and 5 deletions
|
@ -236,13 +236,10 @@ func (ind *Index) MediaFile(m *MediaFile, o IndexOptions, originalName string) (
|
|||
}
|
||||
}
|
||||
|
||||
if photo.Place == nil {
|
||||
if len(photo.PlaceID) < 2 {
|
||||
photo.Place = &entity.UnknownPlace
|
||||
photo.PlaceID = entity.UnknownPlace.ID
|
||||
}
|
||||
|
||||
if photo.PhotoCountry == "" || photo.PhotoCountry == "zz" {
|
||||
photo.PhotoCountry = photo.Place.LocCountry
|
||||
photo.PhotoCountry = entity.UnknownPlace.CountryCode()
|
||||
}
|
||||
|
||||
if !photo.TakenAtLocal.IsZero() {
|
||||
|
|
Loading…
Reference in a new issue