aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2012-03-25 14:12:53 +0200
committerElrond <elrond+mediagoblin.org@samba-tng.org>2012-03-25 14:12:53 +0200
commit763ef5b77eaa8f6f172c26f6cb2d985dcd330f44 (patch)
treecec0039dfe331f4955a21f34e2f8f7c100e7c006
parentdb4039165fb049561a0819e4394be8ddad39ab91 (diff)
downloadmediagoblin-763ef5b77eaa8f6f172c26f6cb2d985dcd330f44.tar.lz
mediagoblin-763ef5b77eaa8f6f172c26f6cb2d985dcd330f44.tar.xz
mediagoblin-763ef5b77eaa8f6f172c26f6cb2d985dcd330f44.zip
Start to fill media_data.exif_all in addition.
In addition to filling the normal slot media_data['exif'], now also fill media_data.exif_all. This is the new slot used by SQL. For a few moments this will create duplicated entries in the mongo db. But this shouldn't hurt.
-rw-r--r--mediagoblin/media_types/image/processing.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py
index 6ba91a15..8a53a969 100644
--- a/mediagoblin/media_types/image/processing.py
+++ b/mediagoblin/media_types/image/processing.py
@@ -114,14 +114,17 @@ def process_image(entry):
media_files_dict['medium'] = medium_filepath
# Insert exif data into database
+ exif_all = clean_exif(exif_tags)
media_data = entry.setdefault('media_data', {})
# TODO: Fix for sql media_data, when exif is in sql
if media_data is not None:
media_data['exif'] = {
- 'clean': clean_exif(exif_tags)}
- media_data['exif']['useful'] = get_useful(
- media_data['exif']['clean'])
+ 'clean': exif_all}
+ media_data['exif']['useful'] = get_useful(exif_all)
+
+ if len(exif_all):
+ entry.media_data_init(exif_all=exif_all)
if len(gps_data):
for key in list(gps_data.keys()):