Use CACHE_PREVENT when opening a program so the cache is refreshed.

This commit is contained in:
Michaël Arnauts 2020-03-24 17:58:40 +01:00
parent b0b64d5af8
commit 2c25ddd948

View File

@ -10,7 +10,7 @@ from resources.lib.kodiutils import TitleItem
from resources.lib.modules.menu import Menu
from resources.lib.viervijfzes import CHANNELS
from resources.lib.viervijfzes.auth import AuthApi
from resources.lib.viervijfzes.content import ContentApi, UnavailableException
from resources.lib.viervijfzes.content import ContentApi, UnavailableException, CACHE_PREVENT
_LOGGER = logging.getLogger('catalog')
@ -64,7 +64,7 @@ class Catalog:
:type program_id: str
"""
try:
program = self._api.get_program(channel, program_id)
program = self._api.get_program(channel, program_id, cache=CACHE_PREVENT) # Use CACHE_PREVENT since we want fresh data
except UnavailableException:
kodiutils.ok_dialog(message=kodiutils.localize(30717)) # This program is not available in the catalogue.
kodiutils.end_of_directory()