From c68371bdb5a108220e644b2f0f5c60b825b1a44d Mon Sep 17 00:00:00 2001 From: j2331223 Date: Sun, 6 Aug 2017 01:03:46 +0200 Subject: [PATCH] =?UTF-8?q?Arreglada=20la=20actualizaci=C3=B3n=20de=20la?= =?UTF-8?q?=20videolibrary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.video.alfa/core/channeltools.py | 4 ++++ plugin.video.alfa/videolibrary_service.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin.video.alfa/core/channeltools.py b/plugin.video.alfa/core/channeltools.py index e59dd7b8..0158abdb 100755 --- a/plugin.video.alfa/core/channeltools.py +++ b/plugin.video.alfa/core/channeltools.py @@ -18,6 +18,10 @@ def is_adult(channel_name): channel_parameters = get_channel_parameters(channel_name) return channel_parameters["adult"] +def is_active(channel_name): + logger.info("channel_name=" + channel_name) + channel_parameters = get_channel_parameters(channel_name) + return channel_parameters["active"] def get_channel_parameters(channel_name): global dict_channels_parameters diff --git a/plugin.video.alfa/videolibrary_service.py b/plugin.video.alfa/videolibrary_service.py index 51344bf9..8c3c457a 100644 --- a/plugin.video.alfa/videolibrary_service.py +++ b/plugin.video.alfa/videolibrary_service.py @@ -11,6 +11,7 @@ import threading from core import config from core import filetools from core import logger +from core import channeltools from core import videolibrarytools from platformcode import platformtools @@ -24,7 +25,7 @@ def update(path, p_dialog, i, t, serie, overwrite): serie.channel = channel serie.url = url - channel_active = config.get_setting("active", channel=channel, default=False) + channel_active = channeltools.is_active(channel) if channel_active: