From 8545cfc97d9336b100881bd3ebafd4a5f4882dd3 Mon Sep 17 00:00:00 2001 From: Elrond Date: Tue, 13 Dec 2011 11:18:39 +0100 Subject: [PATCH] Dot-Notation for MediaEntry.queued_media_file --- mediagoblin/media_types/image/processing.py | 4 ++-- mediagoblin/media_types/video/processing.py | 2 +- mediagoblin/submit/views.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py index e493eb2b..cf90388f 100644 --- a/mediagoblin/media_types/image/processing.py +++ b/mediagoblin/media_types/image/processing.py @@ -37,7 +37,7 @@ def process_image(entry): workbench.dir, 'conversions') os.mkdir(conversions_subdir) - queued_filepath = entry['queued_media_file'] + queued_filepath = entry.queued_media_file queued_filename = workbench.localized_file( mgg.queue_store, queued_filepath, 'source') @@ -98,7 +98,7 @@ def process_image(entry): original_file.write(queued_file.read()) mgg.queue_store.delete_file(queued_filepath) - entry['queued_media_file'] = [] + entry.queued_media_file = [] media_files_dict = entry.setdefault('media_files', {}) media_files_dict['thumb'] = thumb_filepath media_files_dict['original'] = original_filepath diff --git a/mediagoblin/media_types/video/processing.py b/mediagoblin/media_types/video/processing.py index c260cfd6..49a50647 100644 --- a/mediagoblin/media_types/video/processing.py +++ b/mediagoblin/media_types/video/processing.py @@ -45,7 +45,7 @@ def process_video(entry): workbench = mgg.workbench_manager.create_workbench() - queued_filepath = entry['queued_media_file'] + queued_filepath = entry.queued_media_file queued_filename = workbench.localized_file( mgg.queue_store, queued_filepath, 'source') diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py index 60693bd6..dd273c7f 100644 --- a/mediagoblin/submit/views.py +++ b/mediagoblin/submit/views.py @@ -89,7 +89,7 @@ def submit_start(request): queue_file.write(request.POST['file'].file.read()) # Add queued filename to the entry - entry['queued_media_file'] = queue_filepath + entry.queued_media_file = queue_filepath # We generate this ourselves so we know what the taks id is for # retrieval later. -- 2.25.1