Encoding issues. fix #974

This commit is contained in:
Ruud
2012-12-17 20:50:58 +01:00
parent d9c437bd7f
commit 9f0746a668
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -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:
+2 -3
View File
@@ -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)