From 9f0746a668b083954f5e1bedabf292ab049525bc Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 17 Dec 2012 20:50:58 +0100 Subject: [PATCH] Encoding issues. fix #974 --- couchpotato/core/helpers/encoding.py | 2 +- couchpotato/core/plugins/base.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/couchpotato/core/helpers/encoding.py b/couchpotato/core/helpers/encoding.py index b4f4b70a..a11dd88b 100644 --- a/couchpotato/core/helpers/encoding.py +++ b/couchpotato/core/helpers/encoding.py @@ -68,7 +68,7 @@ def tryUrlencode(s): return new[1:] else: - for letter in toUnicode(s): + for letter in ss(s): try: new += quote_plus(letter) except: diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 2186054d..49ecbef0 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -1,8 +1,7 @@ from StringIO import StringIO from couchpotato import addView from couchpotato.core.event import fireEvent, addEvent -from couchpotato.core.helpers.encoding import tryUrlencode, simplifyString, ss, \ - toSafeString +from couchpotato.core.helpers.encoding import tryUrlencode, ss, toSafeString from couchpotato.core.helpers.variable import getExt, md5 from couchpotato.core.logger import CPLog from couchpotato.environment import Env @@ -222,7 +221,7 @@ class Plugin(object): def getCache(self, cache_key, url = None, **kwargs): - cache_key = md5(cache_key) + cache_key = md5(ss(cache_key)) cache = Env.get('cache').get(cache_key) if cache: if not Env.get('dev'): log.debug('Getting cache %s', cache_key)