[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GMG-Devel] Tags/Collections for batchaddmedia

From: Dan Krol
Subject: Re: [GMG-Devel] Tags/Collections for batchaddmedia
Date: Tue, 3 Nov 2015 07:46:03 -0800

Okay, I'm guessing that the reason tags weren't added to batchaddmedia is that submit_media takes a string parameter for tag names rather than the corresponding tag objects. This means that submit_media would likely be querying for the same tags over and over again, which is very inefficient. So, it's maybe worth splitting out a function underneath submit_media that takes the tag objects, which submit_media calls on? Do you all have a recommended way to do this, that's in line with your code's organization? I assume just adding tag_objects and collection_objects parameters would muddy up submit_media's interface.

For my own purposes I can just do it the inefficient way for now, if there's not a great answer for this. Here's what it looks like at the moment (forked from v0.8.0 fo rnow), and it seems to work:

On Sun, Nov 1, 2015 at 1:02 PM, Dan Krol <address@hidden> wrote:

I am working on adding auto-add-to-collection to the addmedia and batchadmedia gmg commands. I'd like it for my own purposes, but I'd like to offer it as a patch as well if you all are interested. As long as I'm messaging about my main question (below), I'm curious what you all think about this, whether it's a good idea and anything I should keep in mind, before I finish and submit it.

But the main thing I was wondering was, how come even tags are unsupported in the batch version, whereas they're supported in the single item version?


Is this just a leftover to-do item? If so, I'd be happy to try to add that in as well, because again I would like it for my own purposes. Or is there some big technical complication here, and I'd just be wasting my efforts?

One thing I can think of is that you'd want to join all the requested tags and query/create them at once instead of repeatedly for each item in the list. And then there's the rollback question in case of error, but that's relevant even in the single item version.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]