The branch, frodo has been updated
via 829dbbc910cd2f2fd1d69ab2bb5517b24e8e8356 (commit)
from 0b09beb79c00a461b823eb97c1a8ce12565a75da (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=829dbbc910cd2f2fd1d69ab2bb5517b24e8e8356
commit 829dbbc910cd2f2fd1d69ab2bb5517b24e8e8356
Author: beenje <[email protected]>
Date: Sun Jan 27 22:46:59 2013 +0100
[plugin.video.m6groupe] updated to version 2.0.5
diff --git a/plugin.video.m6groupe/addon.xml b/plugin.video.m6groupe/addon.xml
index 2d74a92..d92e994 100644
--- a/plugin.video.m6groupe/addon.xml
+++ b/plugin.video.m6groupe/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.m6groupe" name="M6 groupe" version="2.0.4"
provider-name="beenje">
+<addon id="plugin.video.m6groupe" name="M6 groupe" version="2.0.5"
provider-name="beenje">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.xbmcswift2" version="1.3.1"/>
diff --git a/plugin.video.m6groupe/changelog.txt
b/plugin.video.m6groupe/changelog.txt
index 46490c8..05e250b 100644
--- a/plugin.video.m6groupe/changelog.txt
+++ b/plugin.video.m6groupe/changelog.txt
@@ -1,3 +1,10 @@
+[B]Version 2.0.5[/B]
+
+- Fix video duration
+- Fix 6ter catalog (unknown genre id)
+- Add debug traces
+- Add parameter to enable/disbale SWF verification
+
[B]Version 2.0.4[/B]
- Update for requests 1.0.4
diff --git a/plugin.video.m6groupe/resources/language/English/strings.xml
b/plugin.video.m6groupe/resources/language/English/strings.xml
index 2b54480..c81ebe2 100644
--- a/plugin.video.m6groupe/resources/language/English/strings.xml
+++ b/plugin.video.m6groupe/resources/language/English/strings.xml
@@ -14,4 +14,5 @@
<string id="30022">clips</string>
<string id="30101">Advanced</string>
<string id="30102">Catalog refresh delay (minutes)</string>
+ <string id="30103">Enable SWF verification</string>
</strings>
diff --git a/plugin.video.m6groupe/resources/language/French/strings.xml
b/plugin.video.m6groupe/resources/language/French/strings.xml
index 1184402..670cf01 100644
--- a/plugin.video.m6groupe/resources/language/French/strings.xml
+++ b/plugin.video.m6groupe/resources/language/French/strings.xml
@@ -14,4 +14,5 @@
<string id="30022">clips</string>
<string id="30101">Avancé</string>
<string id="30102">Délai de rafraichissement du catalogue (minutes)</string>
+ <string id="30103">Activer la vérification SWF</string>
</strings>
diff --git a/plugin.video.m6groupe/resources/lib/catalog.py
b/plugin.video.m6groupe/resources/lib/catalog.py
index 6e994e7..e69e5e5 100644
--- a/plugin.video.m6groupe/resources/lib/catalog.py
+++ b/plugin.video.m6groupe/resources/lib/catalog.py
@@ -22,7 +22,6 @@ import requests
import time
import hashlib
import urlparse
-from datetime import timedelta
from config import plugin
@@ -30,6 +29,10 @@ CATALOGUE_URL =
'http://static.m6replay.fr/catalog/m6group_web/%s/catalogue.json
CLIP_URL =
'http://static.m6replay.fr/catalog/m6group_web/%s/clip/%s/clip_infos-%s.json'
IMAGES_URL = 'http://static.m6replay.fr/images/'
TTL = int(plugin.get_setting('cached_ttl'))
+if plugin.get_setting('swf_verify') == 'true':
+ SWF_VERIFY = '
swfUrl=http://www.m6replay.fr/rel-3/M6ReplayV3Application-3.swf swfVfy=1'
+else:
+ SWF_VERIFY = ''
# Bump the CATALOG_API to force a refresh of the catalog
CATALOG_API = '1.0'
@@ -60,7 +63,11 @@ def url_thumb(item):
def get_id_parent(full_catalog, id_gnr):
"""Return the parent id of gnr"""
- id_parent = full_catalog[u'gnrList'][id_gnr][u'idParent']
+ try:
+ id_parent = full_catalog[u'gnrList'][id_gnr][u'idParent']
+ except KeyError:
+ # Unknown genre, just return the given id
+ return id_gnr
if id_parent is None:
# Genre has no parent
return id_gnr
@@ -96,6 +103,8 @@ def get_catalog(channel, api):
'label': gnr[u'name'],
'thumb': url_thumb(gnr),
} for id_gnr, gnr in full_catalog[u'gnrList'].items() if
gnr[u'idParent'] is None]
+ plugin.log.debug('genres:')
+ plugin.log.debug(genres)
# Get programs with visible clips
programs = [{'id': id_pgm,
'label': pgm[u'name'],
@@ -104,15 +113,19 @@ def get_catalog(channel, api):
'clips': pgm[u'clpList'][u'vi'],
'id_gnr': get_id_parent(full_catalog, str(pgm[u'idGnr'])),
} for id_pgm, pgm in full_catalog[u'pgmList'].items() if
pgm[u'clpList'][u'vi']]
+ plugin.log.debug('programs:')
+ plugin.log.debug(programs)
# Get visible clips
clips = [{'id': id_clp,
'label': ' - '.join([clp[u'programName'], clp[u'clpName']]),
'desc': clp[u'desc'],
'date': get_date(clp),
- 'duration': str(timedelta(seconds=clp[u'duration'])),
+ 'duration': int(clp[u'duration']) / 60,
'thumb': url_thumb(clp),
'id_pgm': str(clp[u'idPgm'])
} for id_clp, clp in full_catalog[u'clpList'].items() if
clp[u'type'] == u'vi']
+ plugin.log.debug('clips:')
+ plugin.log.debug(clips)
return {'genres': genres,
'programs': programs,
'clips': clips}
@@ -154,13 +167,16 @@ def get_clip_url(channel, clip):
# Look for a mp4 url
for url in urls:
if url.startswith('mp4:'):
+ plugin.log.debug('mp4 url found')
return get_rtmp_url(url)
# No mp4 url found, try to convert it from the f4m url
for url in urls:
if url.endswith('.f4m'):
+ plugin.log.debug('using .f4m url')
link = 'mp4:production/regienum/' +
url.split('/')[-1].replace('.f4m', '.mp4')
return get_rtmp_url(link)
# No url found
+ plugin.log.debug('no url found')
return None
@@ -181,4 +197,4 @@ def get_rtmp_url(playpath):
#filename = os.path.basename(playpath)
token_url = encode_playpath(app, playpath, int(time.time()))
rtmp_url = '/'.join([rtmp, app, token_url])
- return rtmp_url + '
swfUrl=http://www.m6replay.fr/rel-3/M6ReplayV3Application-3.swf swfVfy=1
timeout=10'
+ return rtmp_url + SWF_VERIFY + ' timeout=10'
diff --git a/plugin.video.m6groupe/resources/settings.xml
b/plugin.video.m6groupe/resources/settings.xml
index b0519b9..c40a995 100644
--- a/plugin.video.m6groupe/resources/settings.xml
+++ b/plugin.video.m6groupe/resources/settings.xml
@@ -6,5 +6,6 @@
</category>
<category label="30101">
<setting label="30102" id="cached_ttl" type="text" default="180" />
+ <setting label="30103" id="swf_verify" type="bool" default="false" />
</category>
</settings>
-----------------------------------------------------------------------
Summary of changes:
plugin.video.m6groupe/addon.xml | 2 +-
plugin.video.m6groupe/changelog.txt | 7 +++++
.../resources/language/English/strings.xml | 1 +
.../resources/language/French/strings.xml | 1 +
plugin.video.m6groupe/resources/lib/catalog.py | 24 ++++++++++++++++---
plugin.video.m6groupe/resources/settings.xml | 1 +
6 files changed, 31 insertions(+), 5 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons