platform fix
This commit is contained in:
1 parent
30df420b4f
commit
ca92203b75
33 files changed
+1835
-1356
No files matched your search
@@ -27,10 +27,8 @@ import math
|
||||
import difflib
|
||||
|
||||
import translit
|
||||
import LOGGER as Log
|
||||
from HTTP import *
|
||||
|
||||
|
||||
USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22'
|
||||
# USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22'
|
||||
ENCODING_PLEX = 'utf-8'
|
||||
@@ -230,7 +228,7 @@ def scoreMediaTitleMatch(mediaName, mediaYear, title, altTitle, year, itemIndex)
|
||||
elif yearDiff == 2:
|
||||
yearPenalty = 25
|
||||
score = score - yearPenalty
|
||||
#print str(mediaYear)+' '+str(year)+' '+str(yearPenalty)
|
||||
# print str(mediaYear)+' '+str(year)+' '+str(yearPenalty)
|
||||
|
||||
# Compute title penalty.
|
||||
titlePenalty = computeTitlePenalty(mediaName, title)
|
||||
@@ -364,8 +362,8 @@ def computeTitlePenalty(mediaName, title):
|
||||
penaltyAlt = penaltyAlt + int(penaltyPerPart * (1 - partDiffRatio))
|
||||
i = i + 1
|
||||
penalty = min(penalty, penaltyAlt)
|
||||
# print '++++++ DIFF("%s", "%s") = %g --> %d' % (mediaName.encode('utf8'), title.encode('utf8'), diffRatio, penalty)
|
||||
# Log.Debug('++++++ DIFF("%s", "%s") = %g --> %d' % (mediaName.encode('utf8'), title.encode('utf8'), diffRatio, penalty))
|
||||
# print '++++++ DIFF("%s", "%s") = %g --> %d' % (mediaName.encode('utf8'), title.encode('utf8'), diffRatio, penalty)
|
||||
# Log.Debug('++++++ DIFF("%s", "%s") = %g --> %d' % (mediaName.encode('utf8'), title.encode('utf8'), diffRatio, penalty))
|
||||
return penalty
|
||||
return 0
|
||||
|
||||
|
||||
@@ -32,9 +32,11 @@ import pluginsettings as S
|
||||
import translit
|
||||
|
||||
|
||||
|
||||
|
||||
# MATCHER_MOVIE_DURATION = re.compile('\s*(\d+).*?', re.UNICODE | re.DOTALL)
|
||||
#MATCHER_IMDB_RATING = re.compile('IMDb:\s*(\d+\.?\d*)\s*\(\s*([\s\d]+)\s*\)', re.UNICODE | re.DOTALL)
|
||||
#MATCHER_IMDB_RATING = re.compile('IMDb:\s*(\d+\.?\d*)\s?\((.*)\)', re.UNICODE)
|
||||
# MATCHER_IMDB_RATING = re.compile('IMDb:\s*(\d+\.?\d*)\s*\(\s*([\s\d]+)\s*\)', re.UNICODE | re.DOTALL)
|
||||
# MATCHER_IMDB_RATING = re.compile('IMDb:\s*(\d+\.?\d*)\s?\((.*)\)', re.UNICODE)
|
||||
|
||||
USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22'
|
||||
'''
|
||||
@@ -171,5 +173,3 @@ class PageParser:
|
||||
results.append([itemKinoPoiskId, itemTitle, itemYear, itemScore])
|
||||
|
||||
return results
|
||||
|
||||
|
||||
@@ -19,11 +19,9 @@ Simple transliteration
|
||||
"""
|
||||
|
||||
# __id__ = __revision__ = "$Id: translit.py 102 2007-07-12 12:33:36Z the.pythy $"
|
||||
#__url__ = "$URL: https://pythy.googlecode.com/svn/tags/pytils/0_2_2/pytils/translit.py $"
|
||||
# __url__ = "$URL: https://pythy.googlecode.com/svn/tags/pytils/0_2_2/pytils/translit.py $"
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
TRANSTABLE = (
|
||||
(u"'", u"'"),
|
||||
|
||||
Reference in new issue
Block a user