Dot-Notation for MediaEntry.media_data
This commit is contained in:
parent
f4ee839939
commit
ddc1cae9ea
@ -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.
|
||||
|
||||
|
@ -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}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user