The branch, dharma has been updated
       via  f2f26afe8896d1e474f028a599a4d5c2cbe20315 (commit)
      from  2756b95a977f302056fe1ae6d1311e9b4f94e889 (commit)

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

commit f2f26afe8896d1e474f028a599a4d5c2cbe20315
Author: spiff <[email protected]>
Date:   Wed Sep 21 22:09:21 2011 +0200

    [plugin.video.drnu] updated to version 1.4.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 c3440ca..720b417 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="1.4.1" name="DR NU Player" 
provider-name="InKaKiLLeR, twinther [[email protected]]">
+<addon id="plugin.video.drnu" version="1.4.2" name="DR NU Player" 
provider-name="InKaKiLLeR, twinther [[email protected]]">
     <requires>
         <import addon="xbmc.python" version="1.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 e62091a..19c2dee 100644
--- a/plugin.video.drnu/changelog.txt
+++ b/plugin.video.drnu/changelog.txt
@@ -1,3 +1,6 @@
+[B]Version 1.4.2 - 2011-09-21[/B]
+- Fix script error on 32 bit OS when expire date of a clip is Jan, 1st 3000
+
 [B]Version 1.4.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