diff --git a/addon.xml b/addon.xml index b37f66f..a28a217 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/movistar.py b/resources/lib/movistar.py index c509aad..05aaf8b 100644 --- a/resources/lib/movistar.py +++ b/resources/lib/movistar.py @@ -133,7 +133,7 @@ class Movistar(object): LOG('device_id: {}'. format(self.account['device_id'])) # Tokens - content = self.cache.load('tokens.json', 3) + content = self.cache.load('tokens.json', 60*24) if content: data = json.loads(content) else: @@ -296,7 +296,7 @@ class Movistar(object): self.cache.remove_file('tokens.json') def get_devices(self, use_cache=True): - content = self.cache.load('devices.json', 3) + content = self.cache.load('devices.json', 60) if use_cache and content: data = json.loads(content) else: @@ -902,6 +902,8 @@ class Movistar(object): t['session_request'] = '' if len(d['VodItems']) > 0: video = d['VodItems'][0] + #if video.get('AssetType') == 'SOON': continue + if not 'UrlVideo' in video: continue t['subscribed'] = self.is_subscribed_vod(video.get('tvProducts', [])) t['url'] = video['UrlVideo'] if video['AssetType'] == 'VOD': diff --git a/resources/lib/plugin.py b/resources/lib/plugin.py index 587a8a4..ac9a4a3 100644 --- a/resources/lib/plugin.py +++ b/resources/lib/plugin.py @@ -300,7 +300,7 @@ def add_videos(category, ctype, videos, ref=None, url_next=None, url_prev=None, actions = [] if t.get('stream_type') == 'u7d': - LOG(t) + #LOG(t) if 'show_id' in t and not t.get('aired', False): record_program_action = (addon.getLocalizedString(30171), "RunPlugin(" + get_url(action='add_recording', id=t['show_id']) + ")") actions.append(record_program_action) @@ -316,7 +316,7 @@ def add_videos(category, ctype, videos, ref=None, url_next=None, url_prev=None, actions.append(wishlist_action) if len(actions) > 0: - LOG(actions) + #LOG(actions) list_item.addContextMenuItems(actions) url = get_url(action='play', id=t['id'], url=t['url'], session_request=t['session_request'], stype=t['stream_type'])