Unicode errors
This commit is contained in:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user