Version 0.8.1

This commit is contained in:
Paco8 committed 2023-12-05 15:00:11 +01:00
1 parent 983c80965a
commit 3432fa939d
3 files changed
+7 -5

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.movistarplus" <addon id="plugin.video.movistarplus"
name="Movistar+" name="Movistar+"
version="0.8.0" version="0.8.1"
provider-name="Paco8"> provider-name="Paco8">
<requires> <requires>
<!--- <import addon="xbmc.python" version="2.25.0"/> --> <!--- <import addon="xbmc.python" version="2.25.0"/> -->
+4 -2
View File
@@ -133,7 +133,7 @@ class Movistar(object):
LOG('device_id: {}'. format(self.account['device_id'])) LOG('device_id: {}'. format(self.account['device_id']))
# Tokens # Tokens
content = self.cache.load('tokens.json', 3) content = self.cache.load('tokens.json', 60*24)
if content: if content:
data = json.loads(content) data = json.loads(content)
else: else:
@@ -296,7 +296,7 @@ class Movistar(object):
self.cache.remove_file('tokens.json') self.cache.remove_file('tokens.json')
def get_devices(self, use_cache=True): 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: if use_cache and content:
data = json.loads(content) data = json.loads(content)
else: else:
@@ -902,6 +902,8 @@ class Movistar(object):
t['session_request'] = '' t['session_request'] = ''
if len(d['VodItems']) > 0: if len(d['VodItems']) > 0:
video = 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['subscribed'] = self.is_subscribed_vod(video.get('tvProducts', []))
t['url'] = video['UrlVideo'] t['url'] = video['UrlVideo']
if video['AssetType'] == 'VOD': if video['AssetType'] == 'VOD':
+2 -2
View File
@@ -300,7 +300,7 @@ def add_videos(category, ctype, videos, ref=None, url_next=None, url_prev=None,
actions = [] actions = []
if t.get('stream_type') == 'u7d': if t.get('stream_type') == 'u7d':
LOG(t) #LOG(t)
if 'show_id' in t and not t.get('aired', False): 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']) + ")") record_program_action = (addon.getLocalizedString(30171), "RunPlugin(" + get_url(action='add_recording', id=t['show_id']) + ")")
actions.append(record_program_action) 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) actions.append(wishlist_action)
if len(actions) > 0: if len(actions) > 0:
LOG(actions) #LOG(actions)
list_item.addContextMenuItems(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']) url = get_url(action='play', id=t['id'], url=t['url'], session_request=t['session_request'], stype=t['stream_type'])