Page 1 of 1
Dark feeds not purged

Posted:
Mon Jan 30, 2012 6:27 am
by jhb50
It seems from my observations that Serviio will only add feeds once they exist and one they are added they do not get removed when the feed is refreshed. That makes sense for things like desktop streaming where the stream may not be present but we want a permanent menu item, but in the case of dynamic web resources where feeds are being added and removed all the time, I would like the old feeds removed. Perhaps Serviio can do this but I don't understand the mecanism. I know in the case where all the feeds go dark that the old feeds are not purged even though Serviio looks for new entries every minute and when you select one of them you get an error because the feed is dark.
Re: Dark feeds not purged

Posted:
Mon Jan 30, 2012 12:30 pm
by zip
do you mean feeds or feed items?
if feeds they will stay in the list unless they expire in the cache at which point they should stop appearing, as they cannot be loaded/parsed any more.
Re: Dark feeds not purged

Posted:
Mon Jan 30, 2012 3:39 pm
by jhb50
I meant "feed items", but I need to do more testing to determine the exact problem.
I'm beginning to think that when a live stream "feed item" is defined in the console that you verify its existance before adding it to the cache, and you do not remove it from the cache on expiry even if the stream is dark. It will only be removed from the cache if the console itemis deleted or unchecked. That is good because I never want my "Desktop Streaming" icon defined as a live stream feed item in the console, to be removed on expiry even if the stream is dark.
On the other hand if a "feed item" is defined in an RSS atom or Webresource, it will NOT be verified for its existance and will be added to the cache even if it is dark. On expiry, the existing cache will be cleared and rebuilt with the then defined RSS or WebResource contents.
If all that is true it explains what I am seeing. I do think however that on expiry if the RSS or WebResource "feed" is "null" that the old "feed items" are NOT being deleted from the cache and will continue to appear even if they are dark, until a new "feed item" appears in the "feed" when automatically checked each minute. I'll try and test this more.
Re: Dark feeds not purged

Posted:
Mon Jan 30, 2012 5:05 pm
by zip
jhb50 wrote:I'm beginning to think that when a live stream "feed item" is defined in the console that you verify its existance before adding it to the cache, and you do not remove it from the cache on expiry even if the stream is dark.
It will only be removed from the cache if the console itemis deleted or unchecked. That is good because I never want my "Desktop Streaming" icon defined as a live stream feed item in the console, to be removed on expiry even if the stream is dark.
Correct. It's technical metadata are already in the persistent cache and it'll therefore be listed for ever.
On the other hand if a "feed item" is defined in an RSS atom or Webresource, it will NOT be verified for its existance and will be added to the cache even if it is dark. On expiry, the existing cache will be cleared and rebuilt with the then defined RSS or WebResource contents.
Feed itself is checked and must be successfully parsed to be added. Its items are only added if it's technical metadata can be retrieved (ffmpeg -i) and thus must be live at the time of addition / expiry. If they later become dead they still appear if they are still part of the feed, as it's tech metadata is in the persistent cache. This helps reducing CPU/network usage when we would have to run ffmpeg -i for each feed item on expiry when we already have the data from before.
Re: Dark feeds not purged

Posted:
Mon Jan 30, 2012 6:04 pm
by jhb50
Great that clarifies it...
and it confirms that if a "feed" is null, meaning that former "feed items" are no longer in the feed, that they should be removed from the cache and no longer appear. I'll test to ensure this is happening, because I suspect it is not.
Re: Dark feeds not purged

Posted:
Tue Jan 31, 2012 4:57 am
by jhb50
OK, I can now confirm that when a feed expires, its existing feed items in the cache are not being cleared when the feed returns null at the time of expiry (ie: there are no feed items at that time), This leaves orphan feed items in the menu for which there no longer streams causing an error if you try to open them. A fix is required to purge any existing feed items from the cache when a feed returns null. I'll post a bug pointing here.
Re: Dark feeds not purged

Posted:
Tue Jan 31, 2012 9:35 am
by zip
so the case is:
1) feed A includes 3 items, parsed ok, expires in 1 h
2) 1h later
3) feed A is parsed again, includes 0 items
4) you browse on the TV, select feed A, it still includes 3 items
Is that correct?
Re: Dark feeds not purged

Posted:
Tue Jan 31, 2012 11:45 pm
by jhb50
You got it!