The branch, eden-pre has been updated
       via  b500be2d748932086e3195ca832a310fec7e6389 (commit)
      from  d044d2c511c46fa13c854d51654c9b9491a50bcd (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=b500be2d748932086e3195ca832a310fec7e6389

commit b500be2d748932086e3195ca832a310fec7e6389
Author: spiff <[email protected]>
Date:   Wed Sep 21 22:06:43 2011 +0200

    [plugin.video.drnu] updated to version 2.0.2

diff --git a/plugin.video.drnu/addon.py b/plugin.video.drnu/addon.py
index f588d9e..8b56725 100644
--- a/plugin.video.drnu/addon.py
+++ b/plugin.video.drnu/addon.py
@@ -129,10 +129,11 @@ class NuAddon(object):
 
                 if program['newestVideoPublishTime'] is not None:
                     publishTime = 
self.parseDate(program['newestVideoPublishTime'])
-                    infoLabels['plotoutline'] = 
ADDON.getLocalizedString(30004) % publishTime.strftime('%d. %b %Y kl. %H:%M')
-                    infoLabels['date'] = publishTime.strftime('%d.%m.%Y')
-                    infoLabels['year'] = int(publishTime.strftime('%Y'))
-                    infoLabels['aired'] = publishTime.strftime('%Y-%m-%d')
+                    if publishTime:
+                        infoLabels['plotoutline'] = 
ADDON.getLocalizedString(30004) % publishTime.strftime('%d. %b %Y kl. %H:%M')
+                        infoLabels['date'] = publishTime.strftime('%d.%m.%Y')
+                        infoLabels['year'] = int(publishTime.strftime('%Y'))
+                        infoLabels['aired'] = publishTime.strftime('%Y-%m-%d')
                     if len(program['labels']) > 0:
                         infoLabels['genre'] = program['labels'][0]
 
@@ -207,10 +208,11 @@ class NuAddon(object):
                 infoLabels['studio'] = video['broadcastChannel']
             if video.has_key('broadcastTime') and video['broadcastTime'] is 
not None:
                 broadcastTime = self.parseDate(video['broadcastTime'])
-                infoLabels['plotoutline'] = ADDON.getLocalizedString(30015) % 
broadcastTime.strftime('%d. %b %Y kl. %H:%M')
-                infoLabels['date'] = broadcastTime.strftime('%d.%m.%Y')
-                infoLabels['aired'] = broadcastTime.strftime('%Y-%m-%d')
-                infoLabels['year'] = int(broadcastTime.strftime('%Y'))
+                if broadcastTime:
+                    infoLabels['plotoutline'] = 
ADDON.getLocalizedString(30015) % broadcastTime.strftime('%d. %b %Y kl. %H:%M')
+                    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:
                 if tvShowTitles.has_key(video['programSerieSlug']):
@@ -224,7 +226,8 @@ class NuAddon(object):
                         tvShowTitles[video['programSerieSlug']] = None
             if video.has_key('expireTime') and video['expireTime'] is not None:
                 expireTime = self.parseDate(video['expireTime'])
-                infoLabels['plot'] += '[CR][CR]' + 
ADDON.getLocalizedString(30016) % expireTime.strftime('%d. %b %Y kl. %H:%M')
+                if expireTime:
+                    infoLabels['plot'] += '[CR][CR]' + 
ADDON.getLocalizedString(30016) % expireTime.strftime('%d. %b %Y kl. %H:%M')
 
             iconImage = self.api.getVideoImageUrl(str(video['id']), 256)
             thumbnailImage = self.api.getVideoImageUrl(str(video['id']), 512)
@@ -259,9 +262,12 @@ class NuAddon(object):
             xbmcplugin.setResolvedUrl(HANDLE, True, item)
 
     def parseDate(self, dateString):
-        m = re.search('/Date\(([0-9]+).*?\)/', dateString)
-        microseconds = long(m.group(1))
-        return datetime.datetime.fromtimestamp(microseconds / 1000)
+        try:
+            m = re.search('/Date\(([0-9]+).*?\)/', dateString)
+            microseconds = long(m.group(1))
+            return datetime.datetime.fromtimestamp(microseconds / 1000)
+        except ValueError:
+            return None
 
 
     def addFavorite(self, slug):
diff --git a/plugin.video.drnu/addon.xml b/plugin.video.drnu/addon.xml
index 1468a9e..587ccf8 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.0.1" name="DR NU Player" 
provider-name="InKaKiLLeR, twinther [[email protected]]">
+<addon id="plugin.video.drnu" version="2.0.2" name="DR NU Player" 
provider-name="InKaKiLLeR, 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/changelog.txt b/plugin.video.drnu/changelog.txt
index 0f1b32e..431abb4 100644
--- a/plugin.video.drnu/changelog.txt
+++ b/plugin.video.drnu/changelog.txt
@@ -1,3 +1,6 @@
+[B]Version 2.0.2 - 2011-09-21[/B]
+- Fix script error on 32 bit OS when expire date of a clip is Jan, 1st 3000
+
 [B]Version 2.0.1 - 2011-09-19[/B]
 - Changed search to use new search API call
 - Added 'Last Chance' videos that will expire soon

-----------------------------------------------------------------------

Summary of changes:
 plugin.video.drnu/addon.py      |   30 ++++++++++++++++++------------
 plugin.video.drnu/addon.xml     |    2 +-
 plugin.video.drnu/changelog.txt |    3 +++
 3 files changed, 22 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to