#915 closed enhancement (fixed)
Add collection option to 'addmedia' cli uploading
Reported by: | Stéphane Péchard | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | programming | Keywords: | test |
Cc: | Parent Tickets: |
Description
Add a collection option to 'addmedia' command line uploading functionnality. Specify the collection with its slug.
Use like this:
gmg addmedia user file.jpg -c collection-slug
This is my first contribution, please tell me what I did wrong :-)
Change History (8)
comment:1 by , 10 years ago
Status: | new → review |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Owner: | set to |
---|---|
Status: | review → in_progress |
This looks pretty nice generally, but:
- One problem with it is that it only takes the collection slug... collections are not unique on slugs, but rather on creator + slug. Maybe making it so that it matches the user uploading plus the slug will be good enough?
- I think you're right, checking that the collection first is a good idea.
I'm not sure what happens when you add media that's not processed yet to a collection, but I see no reason that the mediagoblin machinery shouldn't be smart enough to handle it, so that should be fine I think...
Anyway, if you could address the above two points, I think this would be mergable (though I haven't tested it yet!)
comment:4 by , 10 years ago
Keywords: | test added |
---|
comment:5 by , 10 years ago
Owner: | removed |
---|---|
Status: | in_progress → review |
As requested, I've specified the creator of the collection as the uploading user.
Plus, I now check the collection first.
Commit is here: https://gitorious.org/mediagoblin/spechards-mediagoblin/commit/e119aed22900b682c7dd2cce979f694282f5dbe5
comment:6 by , 8 years ago
Has there been any progress on this patch? I am migrating a large set of media from Flickr to a new MediaGoblin instance, and would love to be able to both command-line-upload my media and organize it into the same collections into which it was sorted originally.
now that I think about it, I should have check the collection before using it in add_media_to_collection()...