Version 0.6.6

This commit is contained in:
Paco8 committed 2023-03-06 14:35:29 +01:00
1 parent 8c78d57315
commit 1de176dce9
7 files changed
+55 -14

No files matched your search

@@ -316,3 +316,15 @@ msgstr ""
msgctxt "#30311"
msgid "Exporting EPG"
msgstr ""
msgctxt "#30312"
msgid "Export channels and EPG now"
msgstr ""
msgctxt "#30320"
msgid "Rating: {}"
msgstr ""
msgctxt "#30321"
msgid "Show age rating before playback"
msgstr ""
@@ -312,3 +312,15 @@ msgstr "Exportando canales"
msgctxt "#30311"
msgid "Exporting EPG"
msgstr "Exportando guía"
msgctxt "#30312"
msgid "Export channels and EPG now"
msgstr "Exportar los canales y la guía ahora"
msgctxt "#30320"
msgid "Rating: {}"
msgstr "Calificación: {}"
msgctxt "#30321"
msgid "Show age rating before playback"
msgstr "Mostrar la calificación de edades al empezar la reproducción"
+1 -1
View File
@@ -156,7 +156,7 @@ class Movistar(object):
self.entitlements['partners'] = data['partners']
self.entitlements['activePackages'] = data['activePackages']
self.entitlements['vodSubscription'] = data['vodSubscription'].split(',')
self.entitlements['linearSubscription'] = data['linearSubscription'].split(',')
self.entitlements['linearSubscription'] = data['linearSubscription'].split(',') if data['linearSubscription'] else []
self.entitlements['suscripcion'] = data['suscripcion']
#print_json(self.entitlements)
self.logged = True
+25 -8
View File
@@ -352,17 +352,19 @@ def list_epg(params):
def listing(name, url):
data = m.download_list(url, use_hz=False)
l = m.get_list(data['Contenidos'])
url_next = data['next']['href'] if isinstance(data['next'], dict) and 'href' in data['next'] else None
url_prev = data['prev']['href'] if isinstance(data['next'], dict) and 'prev' in data['next'] else None
add_videos(name, 'movies', l, url_next=url_next, url_prev=url_prev, ref='listing')
if 'Contenidos' in data:
l = m.get_list(data['Contenidos'])
url_next = data['next']['href'] if isinstance(data['next'], dict) and 'href' in data['next'] else None
url_prev = data['prev']['href'] if isinstance(data['next'], dict) and 'prev' in data['next'] else None
add_videos(name, 'movies', l, url_next=url_next, url_prev=url_prev, ref='listing')
def listing_hz(name, url):
data = m.download_list(url, use_hz=True)
l = m.get_list(data['Contenidos'])
url_next = data['next']['href'] if isinstance(data['next'], dict) and 'href' in data['next'] else None
url_prev = data['prev']['href'] if isinstance(data['next'], dict) and 'prev' in data['next'] else None
add_videos(name, 'movies', l, url_next=url_next, url_prev=url_prev, ref='listing_hz')
if 'Contenidos' in data:
l = m.get_list(data['Contenidos'])
url_next = data['next']['href'] if isinstance(data['next'], dict) and 'href' in data['next'] else None
url_prev = data['prev']['href'] if isinstance(data['next'], dict) and 'prev' in data['next'] else None
add_videos(name, 'movies', l, url_next=url_next, url_prev=url_prev, ref='listing_hz')
def list_vod():
open_folder(addon.getLocalizedString(30111)) # VOD
@@ -489,6 +491,19 @@ def iptv(params):
#except:
# pass
def export_epg_now():
if not m.logged: return
folder = addon.getSetting('epg_folder')
if sys.version_info[0] > 2:
folder = bytes(folder, 'utf-8')
if not folder or not os.path.isdir(folder): return
channels_filename = os.path.join(folder, b"movistar-channels.m3u8")
epg_filename = os.path.join(folder, b"movistar-epg.xml")
show_notification(addon.getLocalizedString(30310), xbmcgui.NOTIFICATION_INFO)
m.export_channels_to_m3u8(channels_filename)
show_notification(addon.getLocalizedString(30311), xbmcgui.NOTIFICATION_INFO)
m.export_epg_to_xml(epg_filename)
def router(paramstring):
"""
Router function that calls other functions
@@ -546,6 +561,8 @@ def router(paramstring):
list_vod()
elif params['action'] == 'search':
search(params)
elif params['action'] == 'export_epg_now':
export_epg_now()
elif 'iptv' in params['action']:
iptv(params)
else:
+3 -2
View File
@@ -34,8 +34,9 @@
<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"/>
<setting label="30312" type="action" id="export_epg_now" action="RunPlugin(plugin://plugin.video.movistarplus/?action=export_epg_now)" enable="eq(-2,true)" option="close" subsetting="true"/>
<setting label="30307" type="action" action="InstallAddon(pvr.iptvsimple)" option="close" visible="!System.HasAddon(pvr.iptvsimple)" enable="eq(-3,true)" subsetting="true"/>
<setting label="30308" type="action" action="Addon.OpenSettings(pvr.iptvsimple)" option="close" visible="System.HasAddon(pvr.iptvsimple)" enable="eq(-4,true)" subsetting="true"/>
</category>
</settings>