Made it possible to submit media with the metadata provided

This commit is contained in:
tilly-Q 2014-04-21 12:07:33 -04:00
parent 0bfb4089cc
commit 45f426ddee
2 changed files with 4 additions and 1 deletions

View File

@ -178,6 +178,7 @@ FAIL: Local file {filename} could not be accessed.".format(filename=filename)
title=maybe_unicodeify(title),
description=maybe_unicodeify(description),
license=maybe_unicodeify(license),
metadata=json_ld_metadata,
tags_string=u"",
upload_limit=upload_limit, max_file_size=max_file_size)
print "Successfully uploading {filename}!".format(filename=filename)

View File

@ -98,7 +98,7 @@ class UserPastUploadLimit(UploadLimitError):
def submit_media(mg_app, user, submitted_file, filename,
title=None, description=None,
license=None, tags_string=u"",
license=None, metadata=None, tags_string=u"",
upload_limit=None, max_file_size=None,
callback_url=None,
# If provided we'll do the feed_url update, otherwise ignore
@ -142,6 +142,8 @@ def submit_media(mg_app, user, submitted_file, filename,
entry.license = license or None
entry.media_metadata = metadata or u""
# Process the user's folksonomy "tags"
entry.tags = convert_to_tag_list_of_dicts(tags_string)