Skip to content

Use customized viewtypes

Thomas requested to merge custom_viewtypes into mainline

Add settings to use and configure customized viewtypes. The viewtypes are configurable per type of window. The default value is based on the default skin Estuary.

This change requires the type of window (defined by the WebScraper class) to be available in KodiUtils class (because it makes sense to call the API to change the viewtype from this class). Therefore the type of the current page is now stored in GlobalContext in order to share it between all the modules.

The second call to WebScraper for TYPE_SHOWS in _build_items_info had to be modified because it was using self.context which cannot be shared anymore because it contains the type of the page (otherwise the type of the current page would become TYPE_EPISODES). This led to some refactoring. Now there is method to send a request: it is used instead of the second call to WebScraper. The generation of the HTML soup and its arguments are not centralized because it won't be used anymore with the web services. The new method is also used to call get_episod_info.

Merge request reports