The branch, eden has been updated
       via  a67b257402078d73e2b1c01b939cb33d2e1384f8 (commit)
      from  6ff1358cad4a7b8f0541cdbfd5d067b2e69c4d4b (commit)

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

commit a67b257402078d73e2b1c01b939cb33d2e1384f8
Author: Martijn Kaijser <[email protected]>
Date:   Fri Mar 22 20:24:52 2013 +0100

    [script.tvguide] 1.4.1

diff --git a/script.tvguide/addon.xml b/script.tvguide/addon.xml
index b2da18e..8a084d1 100644
--- a/script.tvguide/addon.xml
+++ b/script.tvguide/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.tvguide" name="TV Guide" version="1.4.0" 
provider-name="twinther [[email protected]]">
+<addon id="script.tvguide" name="TV Guide" version="1.4.1" 
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/script.tvguide/changelog.txt b/script.tvguide/changelog.txt
index cac3f1a..a81304a 100644
--- a/script.tvguide/changelog.txt
+++ b/script.tvguide/changelog.txt
@@ -1,3 +1,8 @@
+[B]Version 1.4.1 - 2013-03-06[/B]
+- Fixed minor problems with stream setup UI
+- Fixed problem with the hour being displayed twice in start/end times
+- Update language files from Transifex
+
 [B]Version 1.4.0 - 2013-02-03[/B]
 New version with many improvements.
 If you have problems with video streaming please try
diff --git a/script.tvguide/gui.py b/script.tvguide/gui.py
index 3d60cb9..e59caf6 100644
--- a/script.tvguide/gui.py
+++ b/script.tvguide/gui.py
@@ -877,7 +877,7 @@ class TVGuide(xbmcgui.WindowXML):
                 control.setVisible(False)
 
     def formatTime(self, timestamp):
-        format = xbmc.getRegion('time').replace(':%S', '')
+        format = xbmc.getRegion('time').replace(':%S', '').replace('%H%H', 
'%H')
         return timestamp.strftime(format)
 
     def formatDate(self, timestamp):
@@ -907,7 +907,12 @@ class TVGuide(xbmcgui.WindowXML):
             control = self.getControl(self.C_MAIN_TIMEBAR)
             if control:
                 (x, y) = control.getPosition()
-                control.setVisible(timeDelta.days == 0)
+                try:
+                    # Sometimes raises:
+                    # exceptions.RuntimeError: Unknown exception thrown from 
the call "setVisible"
+                    control.setVisible(timeDelta.days == 0)
+                except:
+                    pass
                 
control.setPosition(self._secondsToXposition(timeDelta.seconds), y)
 
             if scheduleTimer and not xbmc.abortRequested and not 
self.isClosing:
@@ -1224,15 +1229,17 @@ class StreamSetupDialog(xbmcgui.WindowXMLDialog):
         elif controlId == self.C_STREAM_ADDONS_OK:
             listControl = self.getControl(self.C_STREAM_ADDONS_STREAMS)
             item = listControl.getSelectedItem()
-            stream = item.getProperty('stream')
-            self.database.setCustomStreamUrl(self.channel, stream)
+            if item:
+                stream = item.getProperty('stream')
+                self.database.setCustomStreamUrl(self.channel, stream)
             self.close()
 
         elif controlId == self.C_STREAM_FAVOURITES_OK:
             listControl = self.getControl(self.C_STREAM_FAVOURITES)
             item = listControl.getSelectedItem()
-            stream = item.getProperty('stream')
-            self.database.setCustomStreamUrl(self.channel, stream)
+            if item:
+                stream = item.getProperty('stream')
+                self.database.setCustomStreamUrl(self.channel, stream)
             self.close()
 
         elif controlId == self.C_STREAM_STRM_OK:
diff --git a/script.tvguide/source.py b/script.tvguide/source.py
index d245408..f00cd6f 100644
--- a/script.tvguide/source.py
+++ b/script.tvguide/source.py
@@ -108,6 +108,7 @@ class Database(object):
         self.updateInProgress = False
         self.updateFailed = False
         self.sourceNotConfigured = False
+        self.settingsChanged = None
 
         #buggalo.addExtraData('source', self.source.KEY)
         #for key in SETTINGS_TO_CHECK:
@@ -220,7 +221,8 @@ class Database(object):
     def _close(self):
         try:
             # rollback any non-commit'ed changes to avoid database lock
-            self.conn.rollback()
+            if self.conn:
+                self.conn.rollback()
         except sqlite3.OperationalError:
             pass # no transaction is active
         self.conn.close()
@@ -556,17 +558,18 @@ class Database(object):
         c.close()
         return expired
 
-
     def setCustomStreamUrl(self, channel, stream_url):
-        self._invokeAndBlockForResult(self._setCustomStreamUrl, channel, 
stream_url)
+        if stream_url is not None:
+            self._invokeAndBlockForResult(self._setCustomStreamUrl, channel, 
stream_url)
         # no result, but block until operation is done
 
     def _setCustomStreamUrl(self, channel, stream_url):
-        c = self.conn.cursor()
-        c.execute("DELETE FROM custom_stream_url WHERE channel=?", 
[channel.id])
-        c.execute("INSERT INTO custom_stream_url(channel, stream_url) 
VALUES(?, ?)", [channel.id, stream_url.decode('utf-8', 'ignore')])
-        self.conn.commit()
-        c.close()
+        if stream_url is not None:
+            c = self.conn.cursor()
+            c.execute("DELETE FROM custom_stream_url WHERE channel=?", 
[channel.id])
+            c.execute("INSERT INTO custom_stream_url(channel, stream_url) 
VALUES(?, ?)", [channel.id, stream_url.decode('utf-8', 'ignore')])
+            self.conn.commit()
+            c.close()
 
     def getCustomStreamUrl(self, channel):
         return self._invokeAndBlockForResult(self._getCustomStreamUrl, channel)

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

Summary of changes:
 script.tvguide/addon.xml     |    2 +-
 script.tvguide/changelog.txt |    5 +++++
 script.tvguide/gui.py        |   19 +++++++++++++------
 script.tvguide/source.py     |   19 +++++++++++--------
 4 files changed, 30 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to