Version 0.6.5
This commit is contained in:
1 parent
f8892a15e0
commit
9908271e9d
8 files changed
+158
-39
No files matched your search
@@ -288,3 +288,31 @@ msgstr ""
|
||||
msgctxt "#30303"
|
||||
msgid "IPTV Manager settings"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30304"
|
||||
msgid "IPTV"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30305"
|
||||
msgid "Export channels and EPG for IPTV automatically"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30306"
|
||||
msgid "Save to this folder (requires restart)"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30307"
|
||||
msgid "Install IPTV Simple add-on"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30308"
|
||||
msgid "Open IPTV Simple settings"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30310"
|
||||
msgid "Exporting channels"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30311"
|
||||
msgid "Exporting EPG"
|
||||
msgstr ""
|
||||
@@ -288,3 +288,27 @@ msgstr "Habilitar integración con IPTV Manager"
|
||||
msgctxt "#30303"
|
||||
msgid "IPTV Manager settings"
|
||||
msgstr "Opciones de IPTV Manager"
|
||||
|
||||
msgctxt "#30305"
|
||||
msgid "Export channels and EPG for IPTV automatically"
|
||||
msgstr "Exportar automáticamente canales y guía para IPTV"
|
||||
|
||||
msgctxt "#30306"
|
||||
msgid "Save to this folder (requires restart)"
|
||||
msgstr "Guardar en esta carpeta (requiere reinicio)"
|
||||
|
||||
msgctxt "#30307"
|
||||
msgid "Install IPTV Simple add-on"
|
||||
msgstr "Instalar el addon IPTV Simple"
|
||||
|
||||
msgctxt "#30308"
|
||||
msgid "Open IPTV Simple settings"
|
||||
msgstr "Abrir la configuración de IPTV Simple"
|
||||
|
||||
msgctxt "#30310"
|
||||
msgid "Exporting channels"
|
||||
msgstr "Exportando canales"
|
||||
|
||||
msgctxt "#30311"
|
||||
msgid "Exporting EPG"
|
||||
msgstr "Exportando guía"
|
||||
+25
-12
@@ -1021,13 +1021,13 @@ class Movistar(object):
|
||||
from urllib.parse import urlencode
|
||||
else:
|
||||
from urllib import urlencode
|
||||
now = time.time()*1000
|
||||
#now = time.time()*1000
|
||||
res = {}
|
||||
epg = self.get_epg()
|
||||
channels = self.get_channels(False)
|
||||
for channel in channels:
|
||||
if not channel['subscribed']: continue
|
||||
id = channel['id']
|
||||
if not channel['subscribed'] or not id in epg: continue
|
||||
res[id] = []
|
||||
for e in epg[id]:
|
||||
t = {}
|
||||
@@ -1036,8 +1036,9 @@ class Movistar(object):
|
||||
t['start'] = datetime.utcfromtimestamp(e['start']/1000).strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||
t['stop'] = datetime.utcfromtimestamp(e['end']/1000).strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
aired = (e['end'] <= now)
|
||||
if aired:
|
||||
#aired = (e['end'] <= now)
|
||||
#if aired:
|
||||
if True:
|
||||
program_id = str(e['show_id'])
|
||||
url = 'https://grmovistar.imagenio.telefonica.net/asfe/rest/tvMediaURLs?tvProgram.id='+ program_id +'&svc=startover'
|
||||
session_request = '{"contentID":' + program_id +',"streamType":"CUTV"}'
|
||||
@@ -1076,19 +1077,31 @@ class Movistar(object):
|
||||
|
||||
epg = self.export_epg()
|
||||
for ch in channels:
|
||||
if not ch['id'] in epg: continue
|
||||
for e in epg[ch['id']]:
|
||||
start = datetime.strptime(e['start'], "%Y-%m-%dT%H:%M:%SZ").strftime("%Y%m%d%H%M%S +0000")
|
||||
stop = datetime.strptime(e['stop'], "%Y-%m-%dT%H:%M:%SZ").strftime("%Y%m%d%H%M%S +0000")
|
||||
url = e.get('stream', None)
|
||||
if url:
|
||||
url = url.replace('&', '&')
|
||||
res.append('<programme start="{}" stop="{}" channel="{}"'.format(start, stop, ch['id']) +
|
||||
(' catchup-id="{}"'.format(url) if url else "") +
|
||||
'>\n' +
|
||||
' <title>{}</title>\n'.format(e['title']) +
|
||||
' <sub-title>{}</sub-title>'.format(e['subtitle']) +
|
||||
'</programme>\n')
|
||||
|
||||
url = url.replace('&', '&')
|
||||
res.append('<programme start="{}" stop="{}" channel="{}"'.format(start, stop, ch['id']) +
|
||||
(' catchup-id="{}"'.format(url) if url else "") +
|
||||
'>\n' +
|
||||
' <title>{}</title>\n'.format(e['title']) +
|
||||
' <sub-title>{}</sub-title>\n'.format(e['subtitle']))
|
||||
if 'image' in e:
|
||||
res.append(' <icon src="{}"/>\n'.format(e['image']))
|
||||
if 'description' in e:
|
||||
res.append(' <desc>{}</desc>\n'.format(e['description']))
|
||||
if 'credits' in e and len(e['credits']) > 0:
|
||||
res.append(' <credits>\n');
|
||||
for c in e['credits']:
|
||||
if c['type'] == 'director':
|
||||
res.append(' <director>{}</director>\n'.format(c['name']))
|
||||
elif c['type'] == 'actor':
|
||||
res.append(' <actor>{}</actor>\n'.format(c['name']))
|
||||
res.append(' </credits>\n');
|
||||
res.append('</programme>\n')
|
||||
res.append('</tv>\n')
|
||||
with io.open(filename, 'w', encoding='utf-8', newline='') as handle:
|
||||
handle.write(''.join(res))
|
||||
|
||||
@@ -237,8 +237,8 @@ def add_videos(category, ctype, videos, ref=None, url_next=None, url_prev=None):
|
||||
list_item.setInfo('video', t['info'])
|
||||
list_item.setArt(t['art'])
|
||||
|
||||
if t.get('stream_type') == 'u7d' and not t.get('aired', False):
|
||||
record_program_action = (addon.getLocalizedString(30171), "RunPlugin(" + get_url(action='add_recording', id=t['id']) + ")")
|
||||
if t.get('stream_type') == 'u7d' and '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']) + ")")
|
||||
list_item.addContextMenuItems([record_program_action])
|
||||
|
||||
if 'rec' in t:
|
||||
@@ -478,15 +478,16 @@ def list_users():
|
||||
def iptv(params):
|
||||
LOG('iptv: params: {}'.format(params))
|
||||
if m.logged:
|
||||
try:
|
||||
#try:
|
||||
if True:
|
||||
from .iptvmanager import IPTVManager
|
||||
port = int(params['port'])
|
||||
if params['action'] == 'iptv-channels':
|
||||
IPTVManager(port).send_channels(m)
|
||||
elif params['action'] == 'iptv-epg':
|
||||
IPTVManager(port).send_epg(m)
|
||||
except:
|
||||
pass
|
||||
#except:
|
||||
# pass
|
||||
|
||||
def router(paramstring):
|
||||
"""
|
||||
|
||||
+11
-2
@@ -6,8 +6,8 @@
|
||||
<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)" enable="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"/>
|
||||
<setting id="reuse_devices" type="bool" label="30023" default="false" visible="true"/>
|
||||
<setting id="open_session" type="bool" label="30022" default="true" visible="true"/>
|
||||
<setting id="reuse_devices" type="bool" label="30023" default="false" visible="false"/>
|
||||
<setting id="open_session" type="bool" label="30022" default="true" visible="false"/>
|
||||
<setting type="sep"/>
|
||||
<setting id="profile_id" type="labelenum" label="Profile ID" values="Auto|OTT|NODTH"/>
|
||||
</category>
|
||||
@@ -21,12 +21,21 @@
|
||||
<setting label="30010" type="labelenum" id="drm_type" values="Widevine|Playready"/>
|
||||
</category>
|
||||
-->
|
||||
<!--
|
||||
<category label="30300">
|
||||
<setting label="30300" type="lsep"/>
|
||||
<setting label="30301" type="action" action="InstallAddon(service.iptv.manager)" option="close" visible="!System.HasAddon(service.iptv.manager)"/>
|
||||
<setting label="30302" type="bool" id="iptv.enabled" default="true" visible="System.HasAddon(service.iptv.manager)" />
|
||||
<setting label="30303" type="action" action="Addon.OpenSettings(service.iptv.manager)" enable="eq(-1,true)" option="close" visible="System.HasAddon(service.iptv.manager)" subsetting="true"/>
|
||||
<setting id="iptv.channels_uri" default="plugin://plugin.video.movistarplus/iptv/channels" visible="false"/>
|
||||
<setting id="iptv.epg_uri" default="plugin://plugin.video.movistarplus/iptv/epg" visible="false"/>
|
||||
</category>
|
||||
-->
|
||||
<category label="30304">
|
||||
<setting label="30305" type="bool" id="export_epg" default="false"/>
|
||||
<setting label="30306" type="folder" id="epg_folder" source="" default="" option="writeable" enable="eq(-1,true)" subsetting="true"/>
|
||||
<setting label="30307" type="action" action="InstallAddon(pvr.iptvsimple)" option="close" visible="!System.HasAddon(pvr.iptvsimple)" enable="eq(-2,true)" subsetting="true"/>
|
||||
<setting label="30308" type="action" action="Addon.OpenSettings(pvr.iptvsimple)" option="close" visible="System.HasAddon(pvr.iptvsimple)" enable="eq(-3,true)" subsetting="true"/>
|
||||
</category>
|
||||
</settings>
|
||||
|
||||
Reference in new issue
Block a user