When to add MediaObject to VideoClipObject

When using a Callbackup for the "key" of a VideoClipObject, what is the right time to add the mediaobject to the VideoClipObject? Do I have to provide the MediaObject instantly or perhaps later on within the Callback-Call for the "key" value?

 

I'm asking to save api calls... Getting the right streaming url for a videoobject would be one more call. I would like to fetch the url only if the user asks to stream the videoclipobject.

 

Greets

Sascha

Callbacks are perfect for this sort of thing.  When doing that you probably also want to use the @indirect decorator and then return an IndirectResponse()

I think this shows what you're looking for:

https://github.com/plexinc-plugins/Services.bundle/blob/master/Contents/Service%20Sets/com.plexapp.plugins.hollywoodreporter/URL/Hollywood%20Reporter/ServiceCode.pys#L33

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.