Skip to content

Commit

Permalink
Version 0.9.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Paco8 committed Oct 8, 2024
1 parent 2a8157c commit af0a1fb
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.movistarplus"
name="Movistar+"
version="0.9.12"
version="0.9.13"
provider-name="Paco8">
<requires>
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
Expand Down
4 changes: 4 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ msgctxt "#30041"
msgid "Subscription country (two letter code):"
msgstr ""

msgctxt "#30042"
msgid "Warn when a title is removed in less than these days:"
msgstr ""

msgctxt "#30050"
msgid "Remember username and password"
msgstr ""
Expand Down
4 changes: 4 additions & 0 deletions resources/language/resource.language.es_es/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ msgctxt "#30041"
msgid "Subscription country (two letter code):"
msgstr "País de la suscripción (código de dos letras):"

msgctxt "#30042"
msgid "Warn when a title is removed in less than these days:"
msgstr "Avisar cuando se elimine un título en menos de estos días:"

msgctxt "#30050"
msgid "Remember username and password"
msgstr "Recordar usuario y clave"
Expand Down
2 changes: 2 additions & 0 deletions resources/lib/movistar.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ def get_title(self, data):
t['subscribed'] = self.is_subscribed_vod(video.get('tvProducts', []))
if not 'UrlVideo' in video: return None
t['url'] = video['UrlVideo']
t['availability'] = {'start': video.get('FechaInicioPublicacion'), 'end': video.get('FechaFinPublicacion')}
if video['AssetType'] == 'VOD':
t['session_request'] = '{"contentID":' + str(t['id']) + ',"drmMediaID":"' + video['CasId'] +'", "streamType":"AST"}'
elif video['AssetType'] == 'U7D':
Expand Down Expand Up @@ -1011,6 +1012,7 @@ def get_episodes(self, id):
if not 'UrlVideo' in video: continue
t['subscribed'] = self.is_subscribed_vod(video.get('tvProducts', []))
t['url'] = video['UrlVideo']
t['availability'] = {'start': video.get('FechaInicioPublicacion'), 'end': video.get('FechaFinPublicacion')}
if video['AssetType'] == 'VOD':
t['session_request'] = '{"contentID":' + str(t['id']) + ',"drmMediaID":"' + video['CasId'] +'", "streamType":"AST"}'
elif video['AssetType'] == 'U7D':
Expand Down
13 changes: 13 additions & 0 deletions resources/lib/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,19 @@ def add_videos(category, ctype, videos, ref=None, url_next=None, url_prev=None,
if 'subscribed' in t:
if addon.getSettingBool('only_subscribed') and t['subscribed'] == False: continue
t['info']['title'] = m.colorize_title(t)

if 'availability' in t:
ends = int(t['availability'].get('end', '0'))
if ends > 0:
now = int(time.time()*1000)
n_hours = int((ends - now) / (1000 * 60 * 60))
n_days = int(n_hours / 24)
if (n_days <= addon.getSettingInt('expdays')):
if n_days < 1:
t['info']['title'] += ' [COLOR red](' + addon.getLocalizedString(30401).format(n_hours) + ')[/COLOR]'
else:
t['info']['title'] += ' [COLOR red](' + addon.getLocalizedString(30400).format(n_days) + ')[/COLOR]'

title_name = t['info']['title']
if not 'type' in t: continue

Expand Down
1 change: 1 addition & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<setting label="30020" type="bool" id="channels_with_epg" default="false"/>
<setting label="30021" type="bool" id="add_extra_info" default="false"/>
<setting label="30033" type="bool" id="uhd" default="false"/>
<setting label="30042" type="number" id="expdays" default="30"/>
<setting id="use_ttml2ssa" type="bool" label="$ADDON[script.module.ttml2ssa 32202]" default="false"/>
<setting id="ssa_settings" type="action" label="$ADDON[script.module.ttml2ssa 32201]" option="close" action="Addon.OpenSettings(script.module.ttml2ssa)" visible="eq(-1,true)" subsetting="true"/>
<setting label="30019" type="action" id="is_settings" action="Addon.OpenSettings(inputstream.adaptive)" enable="System.HasAddon(inputstream.adaptive)" option="close"/>
Expand Down

0 comments on commit af0a1fb

Please sign in to comment.