Comments (3)
key
is set based on the value of type
earlier on line 66.
key = self.exif_map['longitude'] if type == 'longitude' else self.exif_map['latitude']
from elodie.
The image 'with-location-inv.jpg' have the сoordinates inverted relative to 'with-location.jpg'. Tests added was failed. zserg/elodie@ea04b77
The following fix made test passed: zserg/elodie@95923e7
from elodie.
@zserg You're correct. Thanks for commenting despite me closing the issue. Do you mind opening a PR? I would suggest this additional change to make the code more readable. We should use type
when we can and key
for when we need the exivpy2
attribute name.
--- a/elodie/media/photo.py
+++ b/elodie/media/photo.py
@@ -72,14 +72,14 @@ class Photo(Media):
try:
# this is a hack to get the proper direction by negating the values for S and W
latdir = 1
- if(key == self.exif_map['latitude'] and str(exif[self.exif_map['latitude_ref']].value) == 'S'):
+ if(type == 'latitude' and str(exif[self.exif_map['latitude_ref']].value) == 'S'):
latdir = -1
londir = 1
- if(key == self.exif_map['longitude'] and str(exif[self.exif_map['longitude_ref']].value) == 'W'):
+ if(type == 'longitude' and str(exif[self.exif_map['longitude_ref']].value) == 'W'):
londir = -1
from elodie.
Related Issues (20)
- api key generation fails HOT 3
- keywords based dynamic albums HOT 1
- imghdr going away
- Crash on text file NOT containing us-ascii or utf-8 in first line
- feature: able to create symlinks instead of copying
- Calculate checksum of image without EXIF-data
- Unknown Location - invalid AppKey HOT 14
- Support a time offset in addition to absolute time
- ISO 8601 datetime without capitalising the rest of the filename? HOT 1
- Dockerfile no longer resolves to a valid url for Exiftool download
- Dockerfile no longer works with debian:jessie as the base
- Unexpected int returned instead of string from metadata[part] in filesystem.py HOT 1
- Will there be an official Elodie docker image published on the cloud (ie not the Dockerfile) ?
- Elodie not recognizing videos with the .mkv file extension HOT 2
- Feature request: support for NRW and RAF files HOT 1
- config.ini ignored HOT 5
- Hard to tell what the problem is when there's errors importing files HOT 7
- Need to add a test: adding a file which is already in destination
- CircleCI URL for exiftool returns 404
- Use local database for geolocation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elodie.