Version 0.8.1
This commit is contained in:
1 parent
983c80965a
commit
3432fa939d
3 files changed
+7
-5
No files matched your search
@@ -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':
|
||||
|
||||
@@ -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'])
|
||||
|
||||
Reference in new issue
Block a user