Version 0.8.12
This commit is contained in:
1 parent
8a1fb36228
commit
3791ef3ac4
3 files changed
+15
-7
No files matched your search
@@ -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.11"
|
version="0.8.12"
|
||||||
provider-name="Paco8">
|
provider-name="Paco8">
|
||||||
<requires>
|
<requires>
|
||||||
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
|
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
|
||||||
|
|||||||
@@ -458,8 +458,8 @@ class Movistar(object):
|
|||||||
if channels:
|
if channels:
|
||||||
if not date:
|
if not date:
|
||||||
today = datetime.today()
|
today = datetime.today()
|
||||||
date_str = today.strftime('%Y-%m-%dT00:00:00')
|
date = today.strftime('%Y-%m-%dT00:00:00')
|
||||||
ch_data = self.load_epg_data(date_str, duration, channels)
|
ch_data = self.load_epg_data(date, duration, channels)
|
||||||
if not ch_data: return []
|
if not ch_data: return []
|
||||||
data = []
|
data = []
|
||||||
data.append(ch_data)
|
data.append(ch_data)
|
||||||
@@ -1025,9 +1025,9 @@ class Movistar(object):
|
|||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def epg_to_movies(self, channel_id):
|
def epg_to_movies(self, channel_id, date=None):
|
||||||
LOG('epg_to_movies: {}'.format(channel_id))
|
LOG('epg_to_movies: {} {}'.format(channel_id, date))
|
||||||
epg = self.get_epg(channels=channel_id)
|
epg = self.get_epg(channels=channel_id, date=date)
|
||||||
res = []
|
res = []
|
||||||
if not channel_id in epg: return res
|
if not channel_id in epg: return res
|
||||||
for p in epg[channel_id]:
|
for p in epg[channel_id]:
|
||||||
|
|||||||
@@ -420,8 +420,16 @@ def list_profiles(params):
|
|||||||
|
|
||||||
def list_epg(params):
|
def list_epg(params):
|
||||||
LOG('list_epg: {}'.format(params))
|
LOG('list_epg: {}'.format(params))
|
||||||
|
from datetime import datetime, timedelta
|
||||||
if 'id' in params:
|
if 'id' in params:
|
||||||
add_videos(params['name'], 'movies', m.epg_to_movies(params['id']))
|
if not 'date' in params:
|
||||||
|
today = datetime.today()
|
||||||
|
for i in range(7, 1, -1):
|
||||||
|
past_date = today - timedelta(days=i)
|
||||||
|
date = past_date.strftime('%Y-%m-%dT00:00:00')
|
||||||
|
display_str = past_date.strftime('%a %d/%m').capitalize()
|
||||||
|
add_menu_option(display_str, get_url(action='epg', id=params['id'], name=params['name'], date=date))
|
||||||
|
add_videos(params['name'], 'movies', m.epg_to_movies(params['id'], params.get('date')))
|
||||||
else:
|
else:
|
||||||
channels = m.get_channels()
|
channels = m.get_channels()
|
||||||
open_folder(addon.getLocalizedString(30107)) # EPG
|
open_folder(addon.getLocalizedString(30107)) # EPG
|
||||||
|
|||||||
Reference in new issue
Block a user