Page 2 of 2

Re: Proposal to Change Online Sources URLExtract Logic

PostPosted: Sun Feb 10, 2013 12:13 pm
by zip
You keep adding stuff about how you implemented the workaround. Is the solution I suggested do the same for you? viewtopic.php?f=22&t=8757#p61024

If yes, there is no need to describe what you're doing now, it's just confusing.

Re: Proposal to Change Online Sources URLExtract Logic

PostPosted: Sun Feb 10, 2013 6:20 pm
by jhb50
zip wrote:You keep adding stuff about how you implemented the workaround. Is the solution I suggested do the same for you? viewtopic.php?f=22&t=8757#p61024


While I have kept you advised of progress as I worked through this logic, there is only one posting of the final method in the wiki.

I cannot tell if your solution meets the criteria I have posted, because I don't know enough about how Serviio works internally. For example have no idea where you retain or how you update the ContentURLContainer information for each processed feed item. Nor do I know where you retain the items for each individual feed when multiple feeds utilize the same plugin.

I kept adding to my implementation because my initial approach of simply retaining the ContentURLContainers for the items in the current WebResourceContainer did not retain the ContentURLContainer information of items in other enabled subset feeds using the same plugin. It required the implementation of an in-memory "item" cache to retain the ContentURLContainer information of all prior extracted items so I could rebuild the ContentURLContainer for each refreshed WebResourceContainer item, which in turn led to the need to purge expired items from that cache and the need to limit it to 300 items because some extracted items have no expiry and the cache could grow indefinitely.

Extracts resulting from "try again" further complicated the logic and required the addition of an "item cache" index key for each prior item so that the existing item information could be updated in place, otherwise the new extract would be at the end of the "itemcache", increase the size of the cache, and cache searches would need to be in reverse order to find the latest information first.

Perhaps the way you retain, update, purge, limit and search ContentURLContainer information internally already addresses all of these needs that I had to discover and implement with external logic. If so then your proposed solution will work. If not, hopefully my implementation summary will provide you with a checklist of items that need to be addressed.