Avoid plex cache for directory items?

I'm modifying a channel at the minute, and I'm trying to add a "Recently Watched" section to it using Dict items. The only problem is, Plex appears to be caching the directory item for the watched object, and thus not running my code to add the object in (if the object has already been loaded once before). In other words, the "Recently Watched" only works for new items, and completely ignores previous items as Plex is not running my code.

 

I can work around this by adding a "time" variable into the Callback function. For example, Key = Callback(Function, time=time.time()). This tricks Plex into thinking that it is a new item, and allows my code to run. Is this workaround bad? Or reasonable? Since Plex caches the HTML retrieved anyway (I presume), the only potential delay is in processing the code itself right?

You should be able to prevent this by setting no_cache=True on the ObjectContainer:

oc = ObjectContainer(no_cache=True)

You should be able to prevent this by setting no_cache=True on the ObjectContainer:

oc = ObjectContainer(no_cache=True)

Ah great, thanks.

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