Dot-Notation for MediaEntry.media_data

This commit is contained in:
Elrond 2011-12-04 20:26:36 +01:00
parent f4ee839939
commit ddc1cae9ea
2 changed files with 3 additions and 3 deletions

View File

@ -131,7 +131,7 @@ class MediaEntry(Document):
For example, images might contain some EXIF data that's not appropriate
to other formats. You might store it like:
mediaentry['media_data']['exif'] = {
mediaentry.media_data['exif'] = {
'manufacturer': 'CASIO',
'model': 'QV-4000',
'exposure_time': .659}
@ -139,7 +139,7 @@ class MediaEntry(Document):
Alternately for video you might store:
# play length in seconds
mediaentry['media_data']['play_length'] = 340
mediaentry.media_data['play_length'] = 340
... so what's appropriate here really depends on the media type.

View File

@ -75,7 +75,7 @@ def process_video(entry):
entry['media_files']['webm_640'] = medium_filepath
# Save the width and height of the transcoded video
entry['media_data']['video'] = {
entry.media_data['video'] = {
u'width': transcoder.dst_data.videowidth,
u'height': transcoder.dst_data.videoheight}