The branch, eden-pre has been updated
via d449cb199df47b4f92abd7c50a1fa706695a0e6a (commit)
via 5afaf5babf9d5f06362b7c68835f967f2cd900c3 (commit)
from 676779f13943442dcb2fab1e0a320c7c12930a9a (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=d449cb199df47b4f92abd7c50a1fa706695a0e6a
commit d449cb199df47b4f92abd7c50a1fa706695a0e6a
Author: spiff <[email protected]>
Date: Thu Jan 5 16:05:27 2012 +0100
[plugin.video.radbox] updated to version 0.1.0
diff --git a/.gitignore b/.gitignore
index 34ed9d8..bcf9418 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,3 +63,4 @@ plugin.video.revision3/.git/
plugin.video.gametest.dk/.idea
plugin.video.gametest.dk/.gitignore
plugin.video.gametest.dk/.git
+plugin.video.radbox/.git
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=5afaf5babf9d5f06362b7c68835f967f2cd900c3
commit 5afaf5babf9d5f06362b7c68835f967f2cd900c3
Author: spiff <[email protected]>
Date: Thu Jan 5 16:02:39 2012 +0100
[plugin.video.drnu] updated to version 2.1.1
diff --git a/plugin.video.drnu/addon.py b/plugin.video.drnu/addon.py
index 1bdfdd6..69f5dec 100644
--- a/plugin.video.drnu/addon.py
+++ b/plugin.video.drnu/addon.py
@@ -176,10 +176,8 @@ class NuAddon(object):
infoLabels['count'] = int(program['videoCount'])
iconImage = self.api.getProgramSeriesImageUrl(program['slug'],
256)
- thumbnailImage =
self.api.getProgramSeriesImageUrl(program['slug'], 512)
fanartImage =
self.api.getProgramSeriesImageUrl(program['slug'], 1280, 720)
-
- item = xbmcgui.ListItem(infoLabels['title'],
iconImage=iconImage, thumbnailImage=thumbnailImage)
+ item = xbmcgui.ListItem(infoLabels['title'],
iconImage=iconImage)
item.setInfo('video', infoLabels)
item.setProperty('Fanart_Image', fanartImage)
@@ -229,10 +227,8 @@ class NuAddon(object):
infoLabels = self.createInfoLabels(video)
iconImage = self.api.getVideoImageUrl(str(video['id']), 256)
- thumbnailImage = self.api.getVideoImageUrl(str(video['id']), 512)
fanartImage = self.api.getVideoImageUrl(str(video['id']), 1280,
720)
-
- item = xbmcgui.ListItem(infoLabels['title'], iconImage=iconImage,
thumbnailImage=thumbnailImage)
+ item = xbmcgui.ListItem(infoLabels['title'], iconImage=iconImage)
item.setInfo('video', infoLabels)
item.setProperty('Fanart_Image', fanartImage)
url = PATH + '?videoId=' + str(video['id'])
@@ -250,6 +246,10 @@ class NuAddon(object):
def listVideoChapters(self, videoId):
video = self.api.getVideoById(videoId)
+ if not video:
+ xbmcplugin.endOfDirectory(HANDLE, succeeded=False)
+ return
+
items = list()
startTimes = list()
@@ -259,9 +259,8 @@ class NuAddon(object):
# 'Play from the start' item
iconImage = self.api.getVideoImageUrl(str(video['id']), 256)
- thumbnailImage = self.api.getVideoImageUrl(str(video['id']), 512)
fanartImage = self.api.getVideoImageUrl(str(video['id']), 1280, 720)
- item = xbmcgui.ListItem(ADDON.getLocalizedString(30017),
iconImage=iconImage, thumbnailImage=thumbnailImage)
+ item = xbmcgui.ListItem(ADDON.getLocalizedString(30017),
iconImage=iconImage)
item.setProperty('IsPlayable', 'true')
item.setProperty('Fanart_Image', fanartImage)
url = PATH + '?videoId=' + str(video['id'])
@@ -282,10 +281,8 @@ class NuAddon(object):
infoLabels['duration'] = str(duration.seconds)
iconImage = self.api.getChapterImageUrl(str(chapter['id']), 256)
- thumbnailImage = self.api.getChapterImageUrl(str(chapter['id']),
512)
fanartImage = self.api.getChapterImageUrl(str(chapter['id']),
1280, 720)
-
- item = xbmcgui.ListItem(chapter['title'], iconImage=iconImage,
thumbnailImage=thumbnailImage)
+ item = xbmcgui.ListItem(chapter['title'], iconImage=iconImage)
item.setInfo('video', infoLabels)
item.setProperty('IsPlayable', 'true')
item.setProperty('Fanart_Image', fanartImage)
@@ -301,10 +298,15 @@ class NuAddon(object):
def playVideo(self, videoId, startTime = None):
self._updateRecentlyWatched(videoId)
video = self.api.getVideoById(videoId)
+ if not video:
+ raise nuapi.DrNuException('Video with ID %s not found!' % videoId)
- u = urllib2.urlopen(video['videoManifestUrl'])
- rtmpUrl = u.read()
- u.close()
+ try:
+ u = urllib2.urlopen(video['videoManifestUrl'])
+ rtmpUrl = u.read()
+ u.close()
+ except Exception, ex:
+ raise nuapi.DrNuException(ex)
if rtmpUrl[0:7] == '<script':
d = xbmcgui.Dialog()
@@ -313,7 +315,8 @@ class NuAddon(object):
rtmpUrl = rtmpUrl.replace('rtmp://vod.dr.dk/',
'rtmp://vod.dr.dk/cms/')
if startTime:
rtmpUrl += ' start=' + startTime
- item = xbmcgui.ListItem(path = rtmpUrl)
+ thumbnailImage = self.api.getVideoImageUrl(str(video['id']), 256)
+ item = xbmcgui.ListItem(path = rtmpUrl, thumbnailImage =
thumbnailImage)
xbmcplugin.setResolvedUrl(HANDLE, True, item)
def parseDate(self, dateString):
@@ -364,11 +367,6 @@ class NuAddon(object):
infoLabels['date'] = broadcastTime.strftime('%d.%m.%Y')
infoLabels['aired'] = broadcastTime.strftime('%Y-%m-%d')
infoLabels['year'] = int(broadcastTime.strftime('%Y'))
- infoLabels['season'] = infoLabels['year']
- if video.has_key('programSerieSlug') and video['programSerieSlug'] is
not None:
- serie = self.api.getProgramSeriesInfo(video['programSerieSlug'])
- if serie:
- infoLabels['tvshowtitle'] = serie['title']
if video.has_key('expireTime') and video['expireTime'] is not None:
expireTime = self.parseDate(video['expireTime'])
if expireTime:
@@ -404,7 +402,7 @@ class NuAddon(object):
xbmcgui.Dialog().ok(heading, line1, line2, message)
if __name__ == '__main__':
- ADDON = xbmcaddon.Addon(id = 'plugin.video.drnu')
+ ADDON = xbmcaddon.Addon()
PATH = sys.argv[0]
HANDLE = int(sys.argv[1])
PARAMS = urlparse.parse_qs(sys.argv[2][1:])
diff --git a/plugin.video.drnu/addon.xml b/plugin.video.drnu/addon.xml
index e7fa6b5..fae54a5 100644
--- a/plugin.video.drnu/addon.xml
+++ b/plugin.video.drnu/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.drnu" version="2.1.0" name="DR NU Player"
provider-name="twinther [[email protected]]">
+<addon id="plugin.video.drnu" version="2.1.1" name="DR NU Player"
provider-name="twinther [[email protected]]">
<requires>
<import addon="xbmc.python" version="2.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
diff --git a/plugin.video.drnu/buggalo.py b/plugin.video.drnu/buggalo.py
index 987e2f0..2c3311f 100644
--- a/plugin.video.drnu/buggalo.py
+++ b/plugin.video.drnu/buggalo.py
@@ -18,7 +18,7 @@
# http://www.gnu.org/copyleft/gpl.html
#
#
-# Buggalo 1.0
+# Buggalo 1.1 - 2012-01-04
# http://theinfosphere.org/Where_the_Buggalo_Roam
#
import os
@@ -28,6 +28,7 @@ import datetime
import urllib2
import simplejson
import random
+import platform
import xbmcgui
import xbmcaddon
@@ -60,17 +61,26 @@ def onExceptionRaised():
xbmcgui.Dialog().ok(heading, thanks)
def _gatherData(addon, type, value, traceback):
- (sysname, nodename, release, version, machine) = os.uname()
-
data = dict()
data['timestamp'] = datetime.datetime.now().isoformat()
system = dict()
- system['nodename'] = nodename
- system['sysname'] = sysname
- system['release'] = release
- system['version'] = version
- system['machine'] = machine
+ try:
+ if hasattr(os, 'uname'):
+ # Works on recent unix flavors
+ (sysname, nodename, release, version, machine) = os.uname()
+ else:
+ # Works on Windows (and others?)
+ (sysname, nodename, release, version, machine, processor) =
platform.uname()
+
+ system['nodename'] = nodename
+ system['sysname'] = sysname
+ system['release'] = release
+ system['version'] = version
+ system['machine'] = machine
+ except Exception as ex:
+ system['sysname'] = sys.platform
+ system['exception'] = str(ex)
data['system'] = system
addonInfo = dict()
@@ -95,8 +105,13 @@ def _gatherData(addon, type, value, traceback):
return simplejson.dumps(data)
def _submitData(data):
- req = urllib2.Request('http://tommy.winther.nu/exception/submit.php', data)
- req.add_header('Content-Type', 'text/json')
- u = urllib2.urlopen(req)
- u.read()
- u.close()
+ for attempt in range(0, 3):
+ try:
+ req =
urllib2.Request('http://tommy.winther.nu/exception/submit.php', data)
+ req.add_header('Content-Type', 'text/json')
+ u = urllib2.urlopen(req)
+ u.read()
+ u.close()
+ break # success; no further attempts
+ except Exception:
+ pass # probably timeout; retry
diff --git a/plugin.video.drnu/changelog.txt b/plugin.video.drnu/changelog.txt
index 3fb6f8a..0c18135 100644
--- a/plugin.video.drnu/changelog.txt
+++ b/plugin.video.drnu/changelog.txt
@@ -1,3 +1,9 @@
+[B]Version 2.1.1 - 2012-01-04[/B]
+- Fixed a couple of bugs reported by user using the improved error handling
+- Fixed error handling on Windows
+- Fixed broken icons
+- Avoid extra API calls to speed up loading on slower CPUs
+
[B]Version 2.1.0 - 2011-12-30[/B]
- Improved error handling with option for the user to submit exceptions/bugs
- Added option to navigate chapters (can be enabled in settings)
diff --git a/plugin.video.drnu/nuapi.py b/plugin.video.drnu/nuapi.py
index c49646b..7201f9b 100644
--- a/plugin.video.drnu/nuapi.py
+++ b/plugin.video.drnu/nuapi.py
@@ -102,6 +102,7 @@ class DrNuApi(object):
def getVideoById(self, id):
response = self._call_api('videos/%s' % id, 'videobyid-%s.json' % id)
if type(response) in [str, unicode]:
+ print 'Video with ID %s not found' % id
return None
else:
return response
@@ -177,6 +178,6 @@ class DrNuException(Exception):
if __name__ == '__main__':
api = DrNuApi('/tmp', 0)
# json = api.getProgramSeriesVideos('paa-skinner')
- json = api.getVideoById(26877)
+ json = api.getVideoById(16746)
s = simplejson.dumps(json, sort_keys=True, indent=' ')
print '\n'.join([l.rstrip() for l in s.splitlines()])
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
plugin.video.drnu/addon.py | 40 ++--
plugin.video.drnu/addon.xml | 2 +-
plugin.video.drnu/buggalo.py | 41 +++--
plugin.video.drnu/changelog.txt | 6 +
plugin.video.drnu/nuapi.py | 3 +-
.../LICENSE.txt | 8 +-
plugin.video.radbox/README | 7 +
plugin.video.radbox/addon.xml | 23 +++
plugin.video.radbox/changelog.txt | 11 +
plugin.video.radbox/default.py | 209 ++++++++++++++++++++
plugin.video.radbox/fanart.jpg | Bin 0 -> 120881 bytes
plugin.video.radbox/icon.png | Bin 0 -> 15422 bytes
.../resources/language/English/strings.xml | 7 +
plugin.video.radbox/resources/settings.xml | 9 +
15 files changed, 327 insertions(+), 40 deletions(-)
copy {plugin.audio.modland => plugin.video.radbox}/LICENSE.txt (99%)
create mode 100644 plugin.video.radbox/README
create mode 100644 plugin.video.radbox/addon.xml
create mode 100644 plugin.video.radbox/changelog.txt
create mode 100644 plugin.video.radbox/default.py
create mode 100644 plugin.video.radbox/fanart.jpg
create mode 100644 plugin.video.radbox/icon.png
create mode 100644 plugin.video.radbox/resources/language/English/strings.xml
create mode 100644 plugin.video.radbox/resources/settings.xml
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons