diff options
Diffstat (limited to 'mediagoblin/gmg_commands/addmedia.py')
-rw-r--r-- | mediagoblin/gmg_commands/addmedia.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mediagoblin/gmg_commands/addmedia.py b/mediagoblin/gmg_commands/addmedia.py index 8cbfc806..026f3495 100644 --- a/mediagoblin/gmg_commands/addmedia.py +++ b/mediagoblin/gmg_commands/addmedia.py @@ -56,6 +56,11 @@ def parser_setup(subparser): help=( "Slug for this media entry. " "Will be autogenerated if unspecified.")) + subparser.add_argument( + "-c", "--collection-slug", + help=( + "Slug of the collection for this media entry. " + "Should already exist.")) subparser.add_argument( '--celery', @@ -85,8 +90,6 @@ def addmedia(args): print("Can't find a file with filename '%s'" % args.filename) return - upload_limit, max_file_size = get_upload_file_limits(user) - def maybe_unicodeify(some_string): # this is kinda terrible if some_string is None: @@ -102,9 +105,9 @@ def addmedia(args): submitted_file=open(abs_filename, 'rb'), filename=filename, title=maybe_unicodeify(args.title), description=maybe_unicodeify(args.description), + collection_slug=args.collection_slug, license=maybe_unicodeify(args.license), - tags_string=maybe_unicodeify(args.tags) or u"", - upload_limit=upload_limit, max_file_size=max_file_size) + tags_string=maybe_unicodeify(args.tags) or u"") except FileUploadLimit: print("This file is larger than the upload limits for this site.") except UserUploadLimit: |