Changes to display all EXIF information
This commit is contained in:
parent
c732f422ae
commit
b3566e1dc7
@ -229,15 +229,13 @@ class MediaEntryMixin(GenerateSlugMixin):
|
||||
return licenses.get_license_by_url(self.license or "")
|
||||
|
||||
def exif_display_iter(self):
|
||||
from mediagoblin.tools.exif import USEFUL_TAGS
|
||||
|
||||
if not self.media_data:
|
||||
return
|
||||
exif_all = self.media_data.get("exif_all")
|
||||
|
||||
for key in USEFUL_TAGS:
|
||||
if key in exif_all:
|
||||
yield key, exif_all[key]
|
||||
for key in exif_all:
|
||||
label = re.sub('(.)([A-Z][a-z]+)', r'\1 \2', key)
|
||||
yield label.replace('EXIF', '').replace('Image', ''), exif_all[key]
|
||||
|
||||
|
||||
class MediaCommentMixin(object):
|
||||
|
@ -134,7 +134,7 @@ def _ratio_to_list(ratio):
|
||||
|
||||
|
||||
def get_useful(tags):
|
||||
return dict((key, tag) for (key, tag) in tags.iteritems() if key in USEFUL_TAGS)
|
||||
return dict((key, tag) for (key, tag) in tags.iteritems())
|
||||
|
||||
|
||||
def get_gps_data(tags):
|
||||
|
Loading…
x
Reference in New Issue
Block a user