I am not the strongest Python programmer, but I usually manage. I know that these are sandboxed out the wazoo as well, and accept that this is only prudent, given the potential for all sorts of chicanery.
But I can’t for the life of me figure out how to pass a value from search to update. Is this possible given the constraints imposed by the api? Is it obvious and I’m just a dufus?
I’d like to do something similar to the following:
def search(self, results, media, lang, manual):
...
results.Append(MetadataSearchResult(id=media.id, name=c.lower().title(), score=100, lang=lang))
custom-value = 'x'
return
def update(self, metadata, media, lang, force):
if custom-vakue == 'x':
Log ('success')
In update(), media is a MediaTree object, but in search() it’s a Media Container? And no other objects are common to both (not to mention I can’t attach new attributes to any of these any way I can figure). What’s the trick?
Thanks in advance.