Unicode errors

This commit is contained in:
Ruud
2012-01-23 07:56:41 +01:00
parent f277c701da
commit 3bcb230716
+2 -1
View File
@@ -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'])