FAQ  •  Register  •  Login

Expires Immediately

<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Feb 02, 2012 5:47 am

Expires Immediately

I set expires immediately on the feed items for a new groovy, and on first run the feed items are stored in the cache and then nothing happens. I had assumed the feed would be refreshed on demand when accessing any of the feed items again, but nothing happens and the items expire and become orphans. How is expires immediately supposed to work? How do you get those feeds to refresh?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Feb 02, 2012 9:13 am

Re: Expires Immediately

If set true it only runs extractURL() method for the played item, thus extracting a new URL. It does not refresh the actual feed item or feed.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Feb 02, 2012 2:04 pm

Re: Expires Immediately

zip wrote:If set true it only runs extractURL() method for the played item, thus extracting a new URL. It does not refresh the actual feed item or feed.


This sounds like the property should be named "expires never" since your answer implies that "expires immediately" will only load the cache the first time the feed is processed and will then use that initial information in the cache each time an item is played and the extractURL() method is run. Is my interpretation correct? I don't understand the circumstances that you would want to do this.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Feb 02, 2012 2:15 pm

Re: Expires Immediately

it mans the URL expires immediately after the plugin runs. This is useful for certain sources where the (rtmp) URL only lasts for the duration of the clip. Therefore the plugin initially uses the first URL to get the ffmpeg -i information, stores it in the cache (using the cacheKey) and when you press Play on your remote it'll not use the initial URL (as it's probably already expired) but will run the extractURL() again. No need to run ffmpeg -i again as this time, we already have it (obviously the cacheKey has to return the same value as it did the first time).

So it's different to expiresOn where it's more related to the actual piece of content. ExpiresImmediately is related to the content URL. I appreciate the naming could be better, maybe in future we can do something about it.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Feb 02, 2012 3:18 pm

Re: Expires Immediately

An excellent explanation! I'll try and turn all of this into a wiki entry.

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 17 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.