The branch, gotham has been updated
       via  b9947027f5c6a53f2c7e58c1ea6b67dc1b56cc47 (commit)
      from  ed3d20de3e2486d4b8246f429e232f9fb6394c0e (commit)

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

commit b9947027f5c6a53f2c7e58c1ea6b67dc1b56cc47
Author: Martijn Kaijser <[email protected]>
Date:   Thu May 15 08:56:46 2014 +0200

    [service.subtitles.supersubtitles] 0.0.12

diff --git a/service.subtitles.supersubtitles/addon.xml 
b/service.subtitles.supersubtitles/addon.xml
index 3eca5ef..064f20f 100644
--- a/service.subtitles.supersubtitles/addon.xml
+++ b/service.subtitles.supersubtitles/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="service.subtitles.supersubtitles"
        name="Super Subtitles"
-       version="0.0.11"
+       version="0.0.12"
        provider-name="fape">
   <requires>
     <import addon="xbmc.python" version="2.14.0"/>
diff --git a/service.subtitles.supersubtitles/changelog.txt 
b/service.subtitles.supersubtitles/changelog.txt
index 082e683..ce8c1cd 100644
--- a/service.subtitles.supersubtitles/changelog.txt
+++ b/service.subtitles.supersubtitles/changelog.txt
@@ -1,3 +1,7 @@
+0.0.12
+- filename character encoding fix in url
+- more sophisticated exception handling
+
 0.0.11
 - improve load time
 - remove heavy dependency: requests
diff --git a/service.subtitles.supersubtitles/service.py 
b/service.subtitles.supersubtitles/service.py
index 51357b0..5bc7eab 100644
--- a/service.subtitles.supersubtitles/service.py
+++ b/service.subtitles.supersubtitles/service.py
@@ -156,10 +156,12 @@ def send_request(params):
         return urllib2.urlopen(request)
     except urllib2.HTTPError as e:
         errorlog("HTTP Error: %s, %s" % (e.code, url))
-        return None
     except urllib2.URLError as e:
         errorlog("URL Error %s, %s" % (e.reason, url))
-        return None
+    except Exception as e:
+        errorlog("Unexpected exception: %s" % e.message)
+
+    return None
 
 
 def query_data(params):
@@ -167,8 +169,10 @@ def query_data(params):
     if response:
         try:
             return json.load(response, 'utf-8')
-        except json.JSONDecodeError as e:
-            errorlog(e.message)
+        except ValueError as e:
+            errorlog("Json Decode Error: %s" % e.message)
+        except Exception as e:
+            errorlog("Unexpected exception: %s" % e.message)
     return None
 
 
@@ -292,7 +296,7 @@ def search(item):
             listitem.setProperty('hearing_imp', ('false', 
'true')[it.get('hearing', False)])
 
             qparams = {'action': 'download', 'actionsortorder': 
str(index).zfill(2), 'id': it['id'],
-                       'filename': it['filename']}
+                       'filename': it['filename'].encode('utf8')}
             url = "plugin://%s/?%s" % (__scriptid__, urllib.urlencode(qparams))
 
             xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url, 
listitem=listitem, isFolder=False)

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

Summary of changes:
 service.subtitles.supersubtitles/addon.xml     |    2 +-
 service.subtitles.supersubtitles/changelog.txt |    4 ++++
 service.subtitles.supersubtitles/service.py    |   14 +++++++++-----
 3 files changed, 14 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to