The branch, eden has been updated
via c5e8d226deb4a33b3615667ea7b5dd5c3f554626 (commit)
via ad2c366a78c5c82ce881f48e476be385491cf66e (commit)
from e8088d3a85ca618665ec5bbbe362c99d956e5726 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=c5e8d226deb4a33b3615667ea7b5dd5c3f554626
commit c5e8d226deb4a33b3615667ea7b5dd5c3f554626
Author: beenje <[email protected]>
Date: Tue May 21 21:36:57 2013 +0200
[plugin.video.revision3] updated to version 2.0.14
diff --git a/plugin.video.revision3/addon.xml b/plugin.video.revision3/addon.xml
index e8d8b74..29a24cd 100644
--- a/plugin.video.revision3/addon.xml
+++ b/plugin.video.revision3/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.revision3"
name="Revision3"
- version="2.0.13"
+ version="2.0.14"
provider-name="stacked">
<requires>
<import addon="xbmc.python" version="2.0"/>
diff --git a/plugin.video.revision3/addonfunc.py
b/plugin.video.revision3/addonfunc.py
index cabf23b..0f74dd3 100644
--- a/plugin.video.revision3/addonfunc.py
+++ b/plugin.video.revision3/addonfunc.py
@@ -2,20 +2,27 @@
Addon Functions
__author__ = 'stacked <[email protected]>'
__url__ = 'http://code.google.com/p/plugin/'
-__date__ = '03-31-2013'
-__version__ = '0.0.7'
+__date__ = '05-12-2013'
+__version__ = '0.0.8'
'''
import xbmc, xbmcgui, xbmcaddon, xbmcplugin, urllib, urllib2, sys, time,
datetime, buggalo
settings = sys.modules["__main__"].settings
plugin = sys.modules["__main__"].plugin
-useragent = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:19.0) Gecko/20100101
Firefox/19.0'
+useragent = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101
Firefox/20.0'
-def addListItem(label, image, url, isFolder, infoLabels = False, fanart =
False, duration = False):
+def addListItem(label, image, url, isFolder, totalItems, infoLabels = False,
fanart = False, duration = False):
listitem = xbmcgui.ListItem(label = label, iconImage = image,
thumbnailImage = image)
+ if url['mode']:
+ u = sys.argv[0] + '?' + urllib.urlencode(url)
+ else:
+ u = url['url']
if not isFolder:
if settings.getSetting('download') == '' or
settings.getSetting('download') == 'false':
listitem.setProperty('IsPlayable', 'true')
+ if settings.getSetting('playall') == 'true':
+ playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+ playlist.add(url = u, listitem = listitem)
if fanart:
listitem.setProperty('fanart_image', fanart)
if infoLabels:
@@ -25,11 +32,7 @@ def addListItem(label, image, url, isFolder, infoLabels =
False, fanart = False,
listitem.addStreamInfo('video', { 'duration':
int(duration) })
else:
listitem.setInfo(type = 'video', infoLabels = {
'duration': str(datetime.timedelta(milliseconds=int(duration)*1000)) } )
- if url['mode']:
- u = sys.argv[0] + '?' + urllib.urlencode(url)
- else:
- u = url['url']
- ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u,
listitem = listitem, isFolder = isFolder)
+ ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u,
listitem = listitem, isFolder = isFolder, totalItems = totalItems)
return ok
def playListItem(label, image, path, infoLabels, PlayPath = False):
diff --git a/plugin.video.revision3/changelog.txt
b/plugin.video.revision3/changelog.txt
index 6b9f07a..cc2c261 100644
--- a/plugin.video.revision3/changelog.txt
+++ b/plugin.video.revision3/changelog.txt
@@ -1,3 +1,13 @@
+[B]Version 2.0.14[/B]
+
+- Added option to hide Daily/Extra shows (Enabled by default)
+- Added "Play All" option to play all episodes on the current page
+- Added progress bar when loading directories
+- Switch to Revision3 API for media urls
+- Fixed UnicodeEncodeError when loading Networks subdirectories
+- Fixed ValueError error when loading addon
+- Fixed Https/SSL errors
+
[B]Version 2.0.13[/B]
- Updated addon to support recent Revision3 changes
@@ -7,7 +17,7 @@
- Added new icons (Credits to calincio)
- Added optional information to addon.xml
-[B]Version 3.0.12[/B]
+[B]Version 2.0.12[/B]
- Version bump for frodo
- Fixed video settings issue
diff --git a/plugin.video.revision3/default.py
b/plugin.video.revision3/default.py
index a686ea5..f9de70b 100644
--- a/plugin.video.revision3/default.py
+++ b/plugin.video.revision3/default.py
@@ -1,12 +1,12 @@
-import xbmc, xbmcgui, xbmcplugin, xbmcaddon, urllib, re, string, sys, os,
time, buggalo, urllib2, base64
+import xbmc, xbmcgui, xbmcplugin, xbmcaddon, urllib, re, string, sys, os,
time, buggalo, urllib2, base64, ast
import simplejson as json
plugin = 'Revision3'
__author__ = 'stacked <[email protected]>'
__url__ = 'http://code.google.com/p/plugin/'
-__date__ = '04-01-2013'
-__version__ = '2.0.13'
+__date__ = '05-12-2013'
+__version__ = '2.0.14'
settings = xbmcaddon.Addon(id='plugin.video.revision3')
buggalo.SUBMIT_URL = 'http://www.xbmc.byethost17.com/submit.php'
dbg = False
@@ -17,8 +17,9 @@ archived_thumb = os.path.join( settings.getAddonInfo( 'path'
), 'resources', 'me
recent_thumb = os.path.join( settings.getAddonInfo( 'path' ), 'resources',
'media', 'recent.png' )
featured_thumb = os.path.join( settings.getAddonInfo( 'path' ), 'resources',
'media', 'featured.png' )
networks_thumb = os.path.join( settings.getAddonInfo( 'path' ), 'resources',
'media', 'networks.png' )
+play_thumb = os.path.join( settings.getAddonInfo( 'path' ), 'resources',
'media', 'play.png' )
fanart_bg = os.path.join( settings.getAddonInfo( 'path' ), 'fanart.jpg' )
-BASE = 'https://revision3.com/api/'
+BASE = 'http://revision3.com/api/'
KEY = base64.b64decode(settings.getLocalizedString( 30025 ))
import CommonFunctions
@@ -30,48 +31,61 @@ downloader = downloader.SimpleDownloader()
from addonfunc import addListItem, playListItem, getUrl, getPage, setViewMode,
getParameters, retry
-@retry((IndexError, TypeError))
+@retry((IndexError, TypeError, ValueError))
def build_main_directory(url):
data = json.loads(getUrl(url))['shows']
if settings.getSetting('folder') == 'true' and settings.getSetting(
'downloadPath' ) and url == BASE + 'getShows' + KEY:
u = { 'mode': None, 'url': settings.getSetting( 'downloadPath'
) }
infoLabels = { "Title": settings.getLocalizedString( 30012 ),
"Plot": settings.getLocalizedString( 30022 ) }
- addListItem('[ ' + settings.getLocalizedString( 30012 ) + ' ]',
downloads_thumb, u, True, infoLabels, fanart_bg)
+ addListItem('[ ' + settings.getLocalizedString( 30012 ) + ' ]',
downloads_thumb, u, True, 0, infoLabels, fanart_bg)
if url == BASE + 'getShows' + KEY:
#Featured
u = { 'mode': '1', 'name': settings.getLocalizedString( 30023
), 'url': BASE + 'getEpisodes' + KEY + '&grouping=featured', 'slug': 'None' }
infoLabels = { "Title": settings.getLocalizedString( 30023 ),
"Plot": settings.getLocalizedString( 30024 ) }
- addListItem('[ ' + settings.getLocalizedString( 30023 ) + ' ]',
featured_thumb, u, True, infoLabels, fanart_bg)
+ addListItem('[ ' + settings.getLocalizedString( 30023 ) + ' ]',
featured_thumb, u, True, 0, infoLabels, fanart_bg)
#Most Recent
u = { 'mode': '1', 'name': settings.getLocalizedString( 30013
), 'url': BASE + 'getEpisodes' + KEY + '&grouping=latest', 'slug': 'None' }
infoLabels = { "Title": settings.getLocalizedString( 30013 ),
"Plot": settings.getLocalizedString( 30018 ) }
- addListItem('[ ' + settings.getLocalizedString( 30013 ) + ' ]',
recent_thumb, u, True, infoLabels, fanart_bg)
+ addListItem('[ ' + settings.getLocalizedString( 30013 ) + ' ]',
recent_thumb, u, True, 0, infoLabels, fanart_bg)
#Networks
u = { 'mode': '4' }
infoLabels = { "Title": settings.getLocalizedString( 30027 ),
"Plot": settings.getLocalizedString( 30028 ) }
- addListItem('[ ' + settings.getLocalizedString( 30027 ) + ' ]',
networks_thumb, u, True, infoLabels, fanart_bg)
+ addListItem('[ ' + settings.getLocalizedString( 30027 ) + ' ]',
networks_thumb, u, True, 0, infoLabels, fanart_bg)
#Archived Shows
u = { 'mode': '3', 'url': BASE + 'getShows' + KEY +
'&grouping=archived' }
infoLabels = { "Title": settings.getLocalizedString( 30014 ),
"Plot": settings.getLocalizedString( 30019 ) }
- addListItem('[ ' + settings.getLocalizedString( 30014 ) + ' ]',
archived_thumb, u, True, infoLabels, fanart_bg)
+ addListItem('[ ' + settings.getLocalizedString( 30014 ) + ' ]',
archived_thumb, u, True, 0, infoLabels, fanart_bg)
+ daily_data = {}
+ for daily_show in data:
+ if daily_show['parent_id'] != None:
+ name = daily_show['name']
+ thumb = daily_show['images']['logo'].replace('\\','')
+ url = BASE + 'getEpisodes' + KEY + '&show_id=' +
daily_show['id']
+ daily_data[daily_show['parent_id']] = { 'name': name,
'url': url, 'plot': daily_show['summary'], 'thumb': thumb}
+ totalItems = len(data) - len(daily_data)
for show in data:
- slug = show['slug']
- if not settings.getSetting(slug):
- fanart = fanart_bg
- else:
- fanart = settings.getSetting(slug)
- name = show['name']
- #fanart = show['images']['hero'].replace('\\','')
- url = BASE + 'getEpisodes' + KEY + '&show_id=' + show['id']
- u = { 'mode': '1', 'name': name, 'url': url, 'slug': slug }
- infoLabels = { "Title": name, "Plot": show['summary'] }
- addListItem(name, show['images']['logo'].replace('\\',''), u,
True, infoLabels, fanart)
+ if show['parent_id'] == None:
+ if show['id'] in daily_data:
+ daily_info = daily_data[show['id']]
+ else:
+ daily_info = 'None'
+ slug = show['slug']
+ if not settings.getSetting(slug):
+ fanart = fanart_bg
+ else:
+ fanart = settings.getSetting(slug)
+ name = show['name']
+ #fanart = show['images']['hero'].replace('\\','')
+ url = BASE + 'getEpisodes' + KEY + '&show_id=' +
show['id']
+ u = { 'mode': '1', 'name': name, 'url': url, 'slug':
slug, 'daily_info': daily_info }
+ infoLabels = { "Title": name, "Plot": show['summary'] }
+ addListItem(name,
show['images']['logo'].replace('\\',''), u, True, totalItems, infoLabels,
fanart)
xbmcplugin.addSortMethod( handle = int(sys.argv[ 1 ]), sortMethod =
xbmcplugin.SORT_METHOD_UNSORTED )
setViewMode("515")
xbmcplugin.endOfDirectory(int(sys.argv[1]))
-@retry((IndexError, TypeError))
-def build_sub_directory(url, name, slug, offset):
+@retry((IndexError, TypeError, ValueError))
+def build_sub_directory(url, name, slug, offset, daily_info):
if slug == None:
dialog = xbmcgui.Dialog()
ok = dialog.ok( plugin , settings.getLocalizedString( 30029 ) )
@@ -96,17 +110,28 @@ def build_sub_directory(url, name, slug, offset):
except:
fanart =
'http://videos.revision3.com/revision3/images/shows/%s/%s_hero.jpg' % (slug,
slug)
if getPage(fanart)['error'] == 'HTTP Error 404: Not
Found':
- settings.setSetting(slug, fanart_bg)
+ fanart = fanart_bg
+ settings.setSetting(slug, fanart)
else:
settings.setSetting(slug, fanart)
+ else:
+ fanart = fanart_bg
+ if daily_info != 'None' and settings.getSetting('daily') == 'true':
+ daily_info = ast.literal_eval(daily_info)
+ u = { 'mode': '1', 'name': daily_info['name'], 'url':
daily_info['url'], 'slug': slug, 'daily_info': 'None' }
+ infoLabels = { "Title": daily_info['name'], "Plot":
daily_info['plot'] }
+ addListItem('[ ' + daily_info['name'] + ' ]',
daily_info['thumb'], u, True, 0, infoLabels, fanart)
+ if settings.getSetting('download') == '' or
settings.getSetting('download') == 'false':
+ if settings.getSetting('playall') == 'true':
+ playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+ playlist.clear()
+ u = { 'mode': '6' }
+ infoLabels = { "Title": settings.getLocalizedString(
30030 ), "Plot": settings.getLocalizedString( 30031 ) }
+ addListItem('* ' + settings.getLocalizedString( 30030 )
+ ' *', play_thumb, u, True, 0, infoLabels, fanart)
for episode in data['episodes']:
studio = episode['show']['name']
thumb = episode['images']['medium']
- url = episode['slug']
- if not settings.getSetting(episode['show']['slug']):
- fanart = fanart_bg
- else:
- fanart = settings.getSetting(episode['show']['slug'])
+ url = episode['media']
plot = episode['summary'].encode('ascii', 'ignore')
name = episode['name'].encode('ascii', 'ignore')
episodenum = episode['number']
@@ -114,11 +139,11 @@ def build_sub_directory(url, name, slug, offset):
duration = int(episode['duration'])
infoLabels = { "Title": name, "Studio": studio, "Plot": plot,
"Episode": int(episodenum), "Aired": date }
u = { 'mode': '2', 'name': name, 'url': url, 'plot': plot,
'studio': studio, 'episode': episodenum, 'thumb': thumb, 'date': date }
- addListItem(plot, thumb, u, False, infoLabels, fanart, duration)
+ addListItem(plot, thumb, u, False, len(data['episodes']),
infoLabels, fanart, duration)
if (int(data['total']) - ((offset + 1) * 25)) > 0:
- u = { 'mode': '1', 'name': studio, 'url': saveurl, 'slug':
slug, 'offset': offset + 1 }
+ u = { 'mode': '1', 'name': studio, 'url': saveurl, 'slug':
slug, 'offset': offset + 1, 'daily_info': 'None' }
infoLabels = { "Title": settings.getLocalizedString( 30016 ),
"Plot": settings.getLocalizedString( 30016 ) }
- addListItem(settings.getLocalizedString( 30016 ) + ' (' + str(
offset + 2 ) + ')', next_thumb, u, True, infoLabels, fanart_bg)
+ addListItem(settings.getLocalizedString( 30016 ) + ' (' + str(
offset + 2 ) + ')', next_thumb, u, True, 0, infoLabels, fanart)
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ),
sortMethod=xbmcplugin.SORT_METHOD_UNSORTED )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ),
sortMethod=xbmcplugin.SORT_METHOD_EPISODE )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ),
sortMethod=xbmcplugin.SORT_METHOD_STUDIO )
@@ -139,7 +164,7 @@ def build_networks_directory():
plot = common.parseDOM(meta, "p")[0].rsplit('\n ')[1]
u = { 'mode': '5', 'url': url }
infoLabels = { "Title": name, "Plot": plot }
- addListItem(name, image, u, True, infoLabels, fanart_bg)
+ addListItem(name, image, u, True, len(item), infoLabels,
fanart_bg)
xbmcplugin.addSortMethod( handle = int(sys.argv[ 1 ]), sortMethod =
xbmcplugin.SORT_METHOD_UNSORTED )
setViewMode("515")
xbmcplugin.endOfDirectory(int(sys.argv[1]))
@@ -153,6 +178,13 @@ def build_networks_sub_directory(url, offset):
dialog = xbmcgui.Dialog()
ok = dialog.ok( plugin , settings.getLocalizedString( 30026 ) +
' this page.' )
return
+ if settings.getSetting('download') == '' or
settings.getSetting('download') == 'false':
+ if settings.getSetting('playall') == 'true':
+ playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+ playlist.clear()
+ u = { 'mode': '6' }
+ infoLabels = { "Title": settings.getLocalizedString(
30030 ), "Plot": settings.getLocalizedString( 30031 ) }
+ addListItem('* ' + settings.getLocalizedString( 30030 )
+ ' *', play_thumb, u, True, 0, infoLabels, fanart_bg)
for item in networkItem:
url = common.parseDOM(item, "a", attrs = { "class":
"playlistPlay clear" }, ret = "href")[0][1:]
thumbnail = common.parseDOM(item, "div", attrs = { "class":
"thumbnail" })
@@ -160,14 +192,14 @@ def build_networks_sub_directory(url, offset):
meta = common.parseDOM(item, "div", attrs = { "class": "meta" })
name = common.parseDOM(meta, "div", attrs = { "class": "title"
})[0]
studio = common.parseDOM(meta, "div", attrs = { "class":
"showtitle" })[0]
- plot = common.parseDOM(meta, "div", attrs = { "class":
"itemPreview" })[0]
+ plot = common.parseDOM(meta, "div", attrs = { "class":
"itemPreview" })[0].encode('ascii', 'ignore')
infoLabels = { "Title": name, "Studio": studio, "Plot": plot }
u = { 'mode': '2', 'name': name, 'url': url, 'plot': plot,
'studio': studio, 'episode': '0', 'thumb': image, 'date': '0000-00-00' }
- addListItem(name, image, u, False, infoLabels, fanart_bg)
+ addListItem(name, image, u, False, len(networkItem),
infoLabels, fanart_bg)
if len(networkItem) == 25:
u = { 'mode': '5', 'url': saveurl, 'offset': offset + 1 }
infoLabels = { "Title": settings.getLocalizedString( 30016 ),
"Plot": settings.getLocalizedString( 30016 ) }
- addListItem(settings.getLocalizedString( 30016 ) + ' (' + str(
offset + 2 ) + ')', next_thumb, u, True, infoLabels, fanart_bg)
+ addListItem(settings.getLocalizedString( 30016 ) + ' (' + str(
offset + 2 ) + ')', next_thumb, u, True, 0, infoLabels, fanart_bg)
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ),
sortMethod=xbmcplugin.SORT_METHOD_UNSORTED )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ),
sortMethod=xbmcplugin.SORT_METHOD_EPISODE )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ),
sortMethod=xbmcplugin.SORT_METHOD_STUDIO )
@@ -177,24 +209,38 @@ def build_networks_sub_directory(url, offset):
@retry((IndexError, TypeError))
def get_video(url, name, plot, studio, episode, thumb, date):
- oembed =
getUrl('http://revision3.com/api/oembed/?url=http://revision3.com/%s/&format=json'
% url)
- video_id =
re.compile('html5player\-v(.+?)\?external').findall(oembed)[0]
- api = getUrl('http://revision3.com/api/flash?video_id=' + video_id)
- videos_api = common.parseDOM(api, "media", ret = "type")
- videos_api[:] = (value for value in videos_api if value != 'thumbnail')
- durl = {}
- for type_api in videos_api:
- content_api = clean(common.parseDOM(api, "media", attrs = {
"type": type_api })[0])
- durl[type_api] = content_api
- try:
- url = durl[settings.getSetting('format').lower()]
- except:
- if 'high' in durl:
- url = durl['high']
- elif 'low' in durl:
- url = durl['low']
- else:
- url = str(durl.items()[0][1])
+ if '{' in url:
+ url = ast.literal_eval(url)
+ try:
+ path =
url[settings.getSetting('format').lower().replace('hd','hd720p30').replace('high','large').replace('low','small')]['url']
+ except:
+ if 'hd' in url:
+ path = url['hd']['url']
+ elif 'large' in url:
+ path = url['large']['url']
+ elif 'small' in url:
+ path = url['small']['url']
+ else:
+ path = url.items()[0][1]['url']
+ else:
+ oembed =
getUrl('http://revision3.com/api/oembed/?url=http://revision3.com/%s/&format=json'
% url)
+ video_id =
re.compile('html5player\-v(.+?)\?external').findall(oembed)[0]
+ api = getUrl('http://revision3.com/api/flash?video_id=' +
video_id)
+ videos_api = common.parseDOM(api, "media", ret = "type")
+ videos_api[:] = (value for value in videos_api if value !=
'thumbnail')
+ durl = {}
+ for type_api in videos_api:
+ content_api = clean(common.parseDOM(api, "media", attrs
= { "type": type_api })[0])
+ durl[type_api] = content_api
+ try:
+ path = durl[settings.getSetting('format').lower()]
+ except:
+ if 'high' in durl:
+ path = durl['high']
+ elif 'low' in durl:
+ path = durl['low']
+ else:
+ path = str(durl.items()[0][1])
if settings.getSetting('download') == 'true':
while not settings.getSetting('downloadPath'):
if settings.getSetting('download') == 'false':
@@ -203,11 +249,16 @@ def get_video(url, name, plot, studio, episode, thumb,
date):
dialog = xbmcgui.Dialog()
ok = dialog.ok(plugin, settings.getLocalizedString(
30011 ))
settings.openSettings()
- params = { "url": url, "download_path":
settings.getSetting('downloadPath'), "Title": name }
- downloader.download(clean_file(name) + '.' +
url.split('/')[-1].split('.')[-1], params)
+ params = { "url": path, "download_path":
settings.getSetting('downloadPath'), "Title": name }
+ downloader.download(clean_file(name) + '.' +
path.split('/')[-1].split('.')[-1], params)
else:
infoLabels = { "Title": name, "Studio": 'Revision3: ' + studio,
"Plot": plot, "Episode": int(episode), "Aired": date }
- playListItem(label = name, image = thumb, path = url,
infoLabels = infoLabels, PlayPath = False)
+ playListItem(label = name, image = thumb, path = path,
infoLabels = infoLabels, PlayPath = False)
+
+def playall():
+ playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+ xbmc.Player().play(playlist)
+ return
def clean(name):
remove = [('&','&'), ('"','"'), (''','\''), ('\r\n',' '),
('\n',' '), (''','\''), ('–','-'), ('%3A',':'), ('%2F','/'),
('<link>',''), ('</link>','')]
@@ -231,6 +282,7 @@ episode = None
thumb = None
date = None
slug = None
+daily_info = 'None'
offset = 0
try:
@@ -270,6 +322,10 @@ try:
except:
pass
try:
+ daily_info = urllib.unquote_plus(params["daily_info"])
+except:
+ pass
+try:
offset = int( params['offset'] )
except:
pass
@@ -279,7 +335,7 @@ try:
url = BASE + 'getShows' + KEY
build_main_directory(url)
elif mode == 1:
- build_sub_directory(url, name, slug, offset)
+ build_sub_directory(url, name, slug, offset, daily_info)
elif mode == 2:
get_video(url, name, plot, studio, episode, thumb, date)
elif mode == 3:
@@ -288,5 +344,7 @@ try:
build_networks_directory()
elif mode == 5:
build_networks_sub_directory(url, offset)
+ elif mode == 6:
+ playall()
except Exception:
buggalo.onExceptionRaised()
diff --git a/plugin.video.revision3/resources/language/English/strings.xml
b/plugin.video.revision3/resources/language/English/strings.xml
index f35927b..96c7c34 100644
--- a/plugin.video.revision3/resources/language/English/strings.xml
+++ b/plugin.video.revision3/resources/language/English/strings.xml
@@ -28,6 +28,10 @@
<string id="30027">Networks</string>
<string id="30028">Whether you're a gamer, tech enthusiast, or just
like to know what's hot right now you can't miss Revision3's newest networks!
Tune in for all the best content plus bonus clips you won't see anywhere
else.</string>
<string id="30029">Please update your Revision3 favorites.</string>
+ <string id="30030">Play All</string>
+ <string id="30031">Play all episodes on the current page.</string>
+ <string id="30032">Enable Play All option</string>
+ <string id="30033">Enable Daily/Extra Shows</string>
<string id="30050">There was a connection error:</string>
<string id="30051">If this problem persists, please submit the error
report.</string>
<string id="30052">Retry</string>
diff --git a/plugin.video.revision3/resources/settings.xml
b/plugin.video.revision3/resources/settings.xml
index 14c87c8..2dd2a47 100644
--- a/plugin.video.revision3/resources/settings.xml
+++ b/plugin.video.revision3/resources/settings.xml
@@ -1,5 +1,7 @@
<settings>
<setting id="format" type="labelenum" lvalues="30001|30002|30003"
label="30000" default="HD"/>
+ <setting id="daily" type="bool" label="30033" default="true"/>
+ <setting id="playall" type="bool" label="30032" default="false"/>
<setting id="download" type="bool" label="30004" default="false"/>
<setting id="downloadPath" type="folder" enable="eq(-1,true)" label="30005"
default="" />
<setting id="folder" type="bool" enable="eq(-2,true)" label="30008"
default="true"/>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=ad2c366a78c5c82ce881f48e476be385491cf66e
commit ad2c366a78c5c82ce881f48e476be385491cf66e
Author: beenje <[email protected]>
Date: Tue May 21 21:36:45 2013 +0200
[plugin.video.mediathek] updated to version 0.4.11
diff --git a/plugin.video.mediathek/addon.xml b/plugin.video.mediathek/addon.xml
index ae1e0c9..8ca9a6f 100644
--- a/plugin.video.mediathek/addon.xml
+++ b/plugin.video.mediathek/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="plugin.video.mediathek"
- version="0.4.10"
+ version="0.4.11"
name="Mediathek"
provider-name="Raptor 2101 [[email protected]]">
<requires>
diff --git a/plugin.video.mediathek/changelog.txt
b/plugin.video.mediathek/changelog.txt
index 014c944..bc10fab 100644
--- a/plugin.video.mediathek/changelog.txt
+++ b/plugin.video.mediathek/changelog.txt
@@ -1,3 +1,4 @@
+0.4.10 - FIX: NDR Fixed by dethfeet
0.4.10 - FIX: adopt some specialities in the ARD Format
- FIX: Get all ARD features back working
- FIX: Get ARD working again (without "Sendungen A-Z")
diff --git a/plugin.video.mediathek/mediathek/ndr.py
b/plugin.video.mediathek/mediathek/ndr.py
index 07eb09f..a23247b 100644
--- a/plugin.video.mediathek/mediathek/ndr.py
+++ b/plugin.video.mediathek/mediathek/ndr.py
@@ -16,17 +16,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import re,time
+import pprint
from mediathek import *
from xml.dom import minidom;
-regex_dateString = re.compile("\\d{4}-\\d{2}-\\d{2}");
-
class NDRMediathek(Mediathek):
@classmethod
+
def name(self):
return "NDR";
+
def isSearchable(self):
return True;
+
def __init__(self, simpleXbmcGui):
self.gui = simpleXbmcGui;
@@ -45,7 +47,8 @@ class NDRMediathek(Mediathek):
self.rootLink = "http://www.ndr.de"
self.menuLink =
self.rootLink+"/mediathek/mediathek100-mediathek_medium-tv_searchtype-"
- self.searchLink = self.menuLink+"fulltext_pageSize-"+self.pageSize+".xml?";
+
+ self.searchLink =
self.rootLink+"/mediathek/mediatheksuche101.html?pagenumber=1&search_video=true&"
self.regex_extractVideoLink =
re.compile("rtmpt://ndr.fcod.llnwd.net/a3715/d1/flashmedia/streams/ndr/(.*\\.)(hi.mp4|lo.flv)");
@@ -55,6 +58,8 @@ class NDRMediathek(Mediathek):
self.mmsBaseLink =
"mms://a874.v1608102.c160810.g.vm.akamaistream.net/7/874/160810/v0001/wm.origin.ndr.gl-systemhaus.de/msmedia/";
self.httpBaseLink = "http://media.ndr.de/progressive/";
+
+ #Hauptmenue
self.menuTree = [
TreeNode("0","Die neuesten
Videos",self.menuLink+"teasershow_pageSize-"+self.pageSize+".xml",True),
];
@@ -68,25 +73,40 @@ class NDRMediathek(Mediathek):
for menuNode in menuNodes:
menuId = menuNode.getAttribute('id')
menuItem = unicode(menuNode.firstChild.data)
- menuLink =
self.rootLink+"/mediathek/mediathek100-mediathek_medium-tv_broadcast-"+menuId+"_pageSize-"+self.pageSize+".xml"
+ menuLink =
self.rootLink+"/mediatheksuche105_broadcast-"+menuId+"_format-video_page-1.html"
self.menuTree.append(TreeNode(str(x),menuItem,menuLink,True));
x = x+1
def buildPageMenu(self, link, initCount):
self.gui.log("buildPageMenu: "+link);
- rssFeed = self.loadConfigXml(link);
- self.extractVideoObjects(rssFeed, initCount);
+ htmlPage = self.loadPage(link);
+
+ regex_extractVideoItems = re.compile("<div
class=\"m_teaser\">(.*?)</p>\n</div>\n</div>",re.DOTALL);
+ regex_extractVideoItemHref = re.compile("<a href=\".*?/([^/]*?)\.html\"
title=\".*?\" .*?>");
+ regex_extractVideoItemDate = re.compile("<div
class=\"subline\">.*?(\\d{2}\.\\d{2}\.\\d{4} \\d{2}:\\d{2})</div>");
+
+ videoItems = regex_extractVideoItems.findall(htmlPage)
+ nodeCount = initCount + len(videoItems)
+
+ for videoItem in videoItems:
+ videoID = regex_extractVideoItemHref.search(videoItem).group(1)
+ dateString = regex_extractVideoItemDate.search(videoItem).group(1)
+ dateTime = time.strptime(dateString,"%d.%m.%Y %H:%M");
+ self.extractVideoInformation(videoID,dateTime,nodeCount)
+
+ #Pagination (weiter)
+ regex_extractNextPage = re.compile("<a href=\"(.*?)\"
class=\"button_next\" title=\"(.*?)\".*?>")
+ nextPageHref = regex_extractNextPage.search(htmlPage)
+ if nextPageHref:
+ menuItemName = nextPageHref.group(2)
+ link = self.rootLink+nextPageHref.group(1)
+
self.gui.buildVideoLink(DisplayObject(menuItemName,"","","description",link,False),self,nodeCount+1);
def searchVideo(self, searchText):
- searchText = searchText.replace( u'\xf6',"oe")
- searchText = searchText.replace( u'\xe4',"ae")
- searchText = searchText.replace( u'\xfc',"ue")
- searchText = searchText.replace( u'\xdf',"ss")
- searchText = searchText.encode("latin1")
- searchText = urllib.urlencode({"searchtext" : searchText})
- self.buildPageMenu(self.searchLink+searchText,0);
- print searchText
+ searchText = searchText.encode("UTF-8")
+ searchText = urllib.urlencode({"query" : searchText})
+ self.buildPageMenu(self.searchLink+searchText,0);
def readText(self,node,textNode):
try:
@@ -98,22 +118,13 @@ class NDRMediathek(Mediathek):
def loadConfigXml(self, link):
self.gui.log("load:"+link)
xmlPage = self.loadPage(link);
+ xmlPage = xmlPage.replace(" & "," & ")
+
try:
xmlDom = minidom.parseString(xmlPage);
except:
xmlDom = False
return xmlDom;
-
- def extractVideoObjects(self, rssFeed, initCount):
- nodes = rssFeed.getElementsByTagName("mediaItem");
- nodeCount = initCount + len(nodes)
- for itemNode in nodes:
- self.extractVideoInformation(itemNode,nodeCount);
-
- def parseDate(self,dateString):
- dateString = regex_dateString.search(dateString).group();
-
- return time.strptime(dateString,"%Y-%m-%d");
def loadVideoLinks(self, videoNode):
videoSources = videoNode.getElementsByTagName("sources")[0]
@@ -142,12 +153,7 @@ class NDRMediathek(Mediathek):
return links;
- def extractVideoInformation(self, itemNode, nodeCount):
- videoId = itemNode.getAttribute("id")
-
- dateString = self.readText(itemNode,"date");
- pubDate = self.parseDate(dateString);
-
+ def extractVideoInformation(self, videoId, pubDate, nodeCount):
videoPage =
self.rootLink+"/fernsehen/sendungen/media/"+videoId+"-avmeta.xml"
videoNode = self.loadConfigXml(videoPage)
-----------------------------------------------------------------------
Summary of changes:
plugin.video.mediathek/addon.xml | 2 +-
plugin.video.mediathek/changelog.txt | 1 +
plugin.video.mediathek/mediathek/ndr.py | 68 ++++----
plugin.video.revision3/addon.xml | 2 +-
plugin.video.revision3/addonfunc.py | 21 ++-
plugin.video.revision3/changelog.txt | 12 ++-
plugin.video.revision3/default.py | 174 +++++++++++++-------
.../resources/language/English/strings.xml | 4 +
plugin.video.revision3/resources/media/play.png | Bin 0 -> 23115 bytes
plugin.video.revision3/resources/settings.xml | 2 +
10 files changed, 185 insertions(+), 101 deletions(-)
create mode 100644 plugin.video.revision3/resources/media/play.png
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons