This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
quick_refresh [2013/02/09 17:48] jhb50 |
quick_refresh [2013/02/10 19:20] (current) jhb50 |
||
---|---|---|---|
Line 3: | Line 3: | ||
This wiki entry describes a method that may be used in web resource plugins to significantly reduce the time required to refresh the plugin feed, by caching the first extracted urls and delaying subsequent extracts to playback time. It allows subsequent refreshes to be completed in a few seconds which allows for more frequent refreshes and currency of available items. | This wiki entry describes a method that may be used in web resource plugins to significantly reduce the time required to refresh the plugin feed, by caching the first extracted urls and delaying subsequent extracts to playback time. It allows subsequent refreshes to be completed in a few seconds which allows for more frequent refreshes and currency of available items. | ||
- | Serviio supports access to online sources with a 3 step process. | + | Serviio supports access to online sources with a 3 step process. |
1) The acquisition of the online items and their titles within a feed. (WebResourceContainer extractItems) | 1) The acquisition of the online items and their titles within a feed. (WebResourceContainer extractItems) | ||
Line 27: | Line 27: | ||
This " | This " | ||
- | The method consists of creating 2 new global lists (new and old) available to both step 1 and step 2, containing the WebResource item information of all items whose urls were previously extracted. During step 1, any existing "new list" of previously extracted items is purged of expired items and a corresponding "old list" is created. Each WebResource item is given an "item key", then checked to see if the "item key" is in the "old list" of items with previously extracted urls, and if so a generate flag in the WebResource item information is set true and its index in the "old list" is added to the WebResource item information for use in step 2. During step 2 either the existing item information in the "old list" index is used to generate the url and reset the WebResource item generate flag to false, if the generate flag is true; or a new url is extracted, the ContentUrl information and the index to the end of the "new list" is added to the WebResource item information and the WebResource item is appended to the "new list". | + | The method consists of creating 2 new global lists (new and old) available to both step 1 and step 2, containing the WebResource item information of all items whose urls were previously extracted. During step 1, any existing "new list" of previously extracted items is purged of expired items and limited to 300 items because some items have no expiry date, and a corresponding "old list" is created. Each WebResource item is then given a unique |
- | The method also supports the re-extraction of a url for any current item by Serviio when " | + | The method also supports the re-extraction of a url for any current item by Serviio when " |
This method is currently implemented in the HaHaSport, Stopstream, ILive, Coolsport, SkysportsPlus and APVideo plugins and makes practical the refresh of these feeds and the update of available events/ | This method is currently implemented in the HaHaSport, Stopstream, ILive, Coolsport, SkysportsPlus and APVideo plugins and makes practical the refresh of these feeds and the update of available events/ | ||
- | The method could be incorporated within Serviio by maintaining the 2 new lists internally and adding the list purge logic at the start of ExtractItems, | + | The method could be incorporated within Serviio by maintaining the 2 new lists internally and adding the list purge logic at the start of ExtractItems, |