The branch, eden has been updated
via 0f1ecf741edc7b397a36a20ac67e8e33245f8dca (commit)
from b7896fcd8a2be1765663399e5b3ad3800d614ebe (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=0f1ecf741edc7b397a36a20ac67e8e33245f8dca
commit 0f1ecf741edc7b397a36a20ac67e8e33245f8dca
Author: beenje <[email protected]>
Date: Wed Dec 5 23:23:13 2012 +0100
[plugin.video.m6groupe] updated to version 1.0.2
diff --git a/plugin.video.m6groupe/addon.py b/plugin.video.m6groupe/addon.py
index 6b17e91..95253ec 100644
--- a/plugin.video.m6groupe/addon.py
+++ b/plugin.video.m6groupe/addon.py
@@ -23,7 +23,7 @@ from config import plugin
from xbmcswift2 import SortMethod
import resources.lib.catalog as catalog
-CHANNELS = ('all', 'M6', 'W9')
+CHANNELS = ('all', 'M6', 'W9', '6ter')
SHOW_BY = ('genre', 'clips')
MEDIA_PATH = os.path.join(plugin.addon.getAddonInfo('path'), 'resources',
'media')
@@ -32,12 +32,10 @@ MEDIA_PATH =
os.path.join(plugin.addon.getAddonInfo('path'), 'resources', 'media
def index():
channels = CHANNELS[int(plugin.get_setting('channels'))]
if channels == 'all':
- items = [{'label': 'M6Replay',
- 'path': plugin.url_for('show_channel', channel='M6'),
- 'thumbnail': os.path.join(MEDIA_PATH, 'm6.png')},
- {'label': 'W9Replay',
- 'path': plugin.url_for('show_channel', channel='W9'),
- 'thumbnail': os.path.join(MEDIA_PATH, 'w9.png')}]
+ items = [{'label': channel + 'Replay',
+ 'path': plugin.url_for('show_channel', channel=channel),
+ 'thumbnail': os.path.join(MEDIA_PATH, channel.lower() +
'.png')}
+ for channel in CHANNELS[1:]]
return items
else:
return show_channel(channels)
diff --git a/plugin.video.m6groupe/addon.xml b/plugin.video.m6groupe/addon.xml
index a0c7f55..9e35b1c 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="1.0.1"
provider-name="beenje">
+<addon id="plugin.video.m6groupe" name="M6 groupe" version="1.0.2"
provider-name="beenje">
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="script.module.xbmcswift2" version="1.3"/>
diff --git a/plugin.video.m6groupe/changelog.txt
b/plugin.video.m6groupe/changelog.txt
index 8961daa..a818bc5 100644
--- a/plugin.video.m6groupe/changelog.txt
+++ b/plugin.video.m6groupe/changelog.txt
@@ -1,3 +1,7 @@
+[B]Version 1.0.2[/B]
+
+- Added 6ter channel
+
[B]Version 1.0.1[/B]
- Added M6 and W9 thumbnails
diff --git a/plugin.video.m6groupe/resources/language/English/strings.xml
b/plugin.video.m6groupe/resources/language/English/strings.xml
index d6a3caf..2b54480 100644
--- a/plugin.video.m6groupe/resources/language/English/strings.xml
+++ b/plugin.video.m6groupe/resources/language/English/strings.xml
@@ -5,9 +5,10 @@
<!-- Settings -->
<string id="30001">General</string>
<string id="30010">Channels</string>
- <string id="30011">M6 and W9</string>
+ <string id="30011">all</string>
<string id="30012">M6</string>
<string id="30013">W9</string>
+ <string id="30014">6ter</string>
<string id="30020">Show by</string>
<string id="30021">genres</string>
<string id="30022">clips</string>
diff --git a/plugin.video.m6groupe/resources/language/French/strings.xml
b/plugin.video.m6groupe/resources/language/French/strings.xml
index 4b05ffb..1184402 100644
--- a/plugin.video.m6groupe/resources/language/French/strings.xml
+++ b/plugin.video.m6groupe/resources/language/French/strings.xml
@@ -5,9 +5,10 @@
<!-- Settings -->
<string id="30001">Général</string>
<string id="30010">Chaînes</string>
- <string id="30011">M6 et W9</string>
+ <string id="30011">toutes</string>
<string id="30012">M6</string>
<string id="30013">W9</string>
+ <string id="30014">6ter</string>
<string id="30020">Afficher par</string>
<string id="30021">genres</string>
<string id="30022">clips</string>
diff --git a/plugin.video.m6groupe/resources/lib/catalog.py
b/plugin.video.m6groupe/resources/lib/catalog.py
index 1609b07..f6ba892 100644
--- a/plugin.video.m6groupe/resources/lib/catalog.py
+++ b/plugin.video.m6groupe/resources/lib/catalog.py
@@ -29,10 +29,14 @@ from config import plugin
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/'
-CODE = {'M6': 'm6replay', 'W9': 'w9replay'}
TTL = int(plugin.get_setting('cached_ttl'))
+def code(channel):
+ """Return the channel code"""
+ return channel.lower() + 'replay'
+
+
def get_json(url):
"""Return the json-encode content of the HTTP GET request"""
try:
@@ -82,8 +86,7 @@ def get_catalog(channel):
"""Return a catalog with only the needed information
This catalog is cached"""
- code = CODE[channel]
- full_catalog = get_json(CATALOGUE_URL % code)
+ full_catalog = get_json(CATALOGUE_URL % code(channel))
# Only get main genres (no parent)
genres = [{'id': id_gnr,
'label': gnr[u'name']
@@ -141,7 +144,7 @@ def get_clips(channel, id_pgm='all'):
def get_clip_url(channel, clip):
"""Return the playable url of the clip"""
clip_key = '/'.join([clip[-2:], clip[-4:-2]])
- asset = get_json(CLIP_URL % (CODE[channel], clip_key, clip))[u'asset']
+ asset = get_json(CLIP_URL % (code(channel), clip_key, clip))[u'asset']
urls = [val[u'url'] for val in asset.values() if
val[u'url'].startswith('mp4:')]
if urls:
return get_rtmp_url(urls[0])
diff --git a/plugin.video.m6groupe/resources/settings.xml
b/plugin.video.m6groupe/resources/settings.xml
index 4b28608..b0519b9 100644
--- a/plugin.video.m6groupe/resources/settings.xml
+++ b/plugin.video.m6groupe/resources/settings.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<category label="30001">
- <setting id="channels" type="enum" lvalues="30011|30012|30013"
default="0" label="30010" />
+ <setting id="channels" type="enum" lvalues="30011|30012|30013|30014"
default="0" label="30010" />
<setting id="show_by" type="enum" lvalues="30021|30022" default="0"
label="30020" />
</category>
<category label="30101">
-----------------------------------------------------------------------
Summary of changes:
plugin.video.m6groupe/addon.py | 12 +++++-------
plugin.video.m6groupe/addon.xml | 2 +-
plugin.video.m6groupe/changelog.txt | 4 ++++
.../resources/language/English/strings.xml | 3 ++-
.../resources/language/French/strings.xml | 3 ++-
plugin.video.m6groupe/resources/lib/catalog.py | 11 +++++++----
plugin.video.m6groupe/resources/media/6ter.png | Bin 0 -> 25367 bytes
plugin.video.m6groupe/resources/settings.xml | 2 +-
8 files changed, 22 insertions(+), 15 deletions(-)
create mode 100644 plugin.video.m6groupe/resources/media/6ter.png
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons