From 3bcb230716fc887b6ef10a29b91e36bd23143cc4 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 23 Jan 2012 07:56:41 +0100 Subject: [PATCH] Unicode errors --- couchpotato/core/plugins/score/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/score/main.py b/couchpotato/core/plugins/score/main.py index 24c2997a..37986193 100644 --- a/couchpotato/core/plugins/score/main.py +++ b/couchpotato/core/plugins/score/main.py @@ -1,4 +1,5 @@ from couchpotato.core.event import addEvent +from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.core.plugins.score.scores import nameScore, nameRatioScore, \ @@ -15,7 +16,7 @@ class Score(Plugin): def calculate(self, nzb, movie): ''' Calculate the score of a NZB, used for sorting later ''' - score = nameScore(nzb['name'], movie['library']['year']) + score = nameScore(toUnicode(nzb['name']), movie['library']['year']) for movie_title in movie['library']['titles']: score += nameRatioScore(nzb['name'], movie_title['title'])