Your 2nd Add-On: Online Videos!
#84
@pa79 If your site complex hierarchy, it does not make any sense to try to build a data structure for this hierarchy in advance. You should generate the list of sub-sections/media-items for each level dynamically.

@aam137 
1. I is not clear what you mean by "video object". If it is some video URL that is too costly to obtain dynamically, then yes, some caching mechanism is recommended.
2. Definitely not at router() function level because it violates the Single Responsibility principle. Create some get_video() function that check cached items validity and obtains new URLs if necessary. But remember that a video plugin does not play anything by itself. It just passes video URLs to the Kodi player and after that its work is done. So a plugin has no way to know if a video URL has been played successfully or not. You can check validity of URLs in advance in your plugin, for example, by issuing HTTP HEAD requests to the URL to be played but this does not give you a 100% guarantee that the URL will be played successfully.
Reply


Messages In This Thread
Your 2nd Add-On: Online Videos! - by zag - 2015-11-20, 15:28
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-11-20, 15:33
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-11-30, 14:42
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-12-01, 12:58
RE: Your 2nd Add-On: Online Videos! - by zag - 2016-01-18, 14:37
RE: Your 2nd Add-On: Online Videos! - by pa79 - 2020-09-09, 19:59
RE: Your 2nd Add-On: Online Videos! - by Roman_V_M - 2020-10-05, 12:36
Logout Mark Read Team Forum Stats Members Help
Your 2nd Add-On: Online Videos!2