The branch, eden-pre has been updated
via d22425c43be47d927d1a1205d2d90c27705e2cfb (commit)
from acd5fe6cb618eed58d4f7e9dc9eb916c96b990c4 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=d22425c43be47d927d1a1205d2d90c27705e2cfb
commit d22425c43be47d927d1a1205d2d90c27705e2cfb
Author: ronie <[email protected]>
Date: Sun Nov 20 22:27:17 2011 +0100
[script.tvtunes] -v1.0.12
fix unicode issue
diff --git a/script.tvtunes/addon.xml b/script.tvtunes/addon.xml
index dbd90af..b930cda 100644
--- a/script.tvtunes/addon.xml
+++ b/script.tvtunes/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.tvtunes"
name="TvTunes"
- version="1.0.11"
+ version="1.0.12"
provider-name="Ppic, ronie">
<requires>
<import addon="xbmc.python" version="2.0"/>
diff --git a/script.tvtunes/changelog.txt b/script.tvtunes/changelog.txt
index bd4fe72..689ad14 100644
--- a/script.tvtunes/changelog.txt
+++ b/script.tvtunes/changelog.txt
@@ -1,3 +1,6 @@
+v1.0.12
+- fix unicode issue
+
v1.0.11
- use simplejson
diff --git a/script.tvtunes/resources/tvtunes_scraper.py
b/script.tvtunes/resources/tvtunes_scraper.py
index 441f600..0deabf7 100644
--- a/script.tvtunes/resources/tvtunes_scraper.py
+++ b/script.tvtunes/resources/tvtunes_scraper.py
@@ -30,6 +30,16 @@ except:
print_exc()
params = {}
+def _unicode( text, encoding='utf-8' ):
+ try: text = unicode( text, encoding )
+ except: pass
+ return text
+
+def normalize_string( text ):
+ try: text = unicodedata.normalize( 'NFKD', _unicode( text ) ).encode(
'ascii', 'ignore' )
+ except: pass
+ return text
+
def get_html_source( url , save=False):
""" fetch the html source """
class AppURLopener(urllib.FancyURLopener):
@@ -201,6 +211,7 @@ class TvTunes:
if json_response['result'].has_key('tvshows'):
for item in json_response['result']['tvshows']:
tvshow = item['label'].replace(":","")
+ tvshow = normalize_string( tvshow )
if self.enable_custom_path == "true":
path = self.custom_path + (tvshow)
else:
-----------------------------------------------------------------------
Summary of changes:
script.tvtunes/addon.xml | 2 +-
script.tvtunes/changelog.txt | 3 +++
script.tvtunes/resources/tvtunes_scraper.py | 11 +++++++++++
3 files changed, 15 insertions(+), 1 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
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. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons