Don't try to split on empty string
This commit is contained in:
1 parent
a0ccff23a3
commit
52f1df98bb
1 file changed
+4
-1
@@ -68,7 +68,10 @@ def namePositionScore(nzb_name, movie_name):
|
|||||||
name_year = fireEvent('scanner.name_year', nzb_name, single = True)
|
name_year = fireEvent('scanner.name_year', nzb_name, single = True)
|
||||||
|
|
||||||
# Give points for movies beginning with the correct name
|
# Give points for movies beginning with the correct name
|
||||||
name_split = simplifyString(nzb_name).split(simplifyString(movie_name))
|
split_by = simplifyString(movie_name)
|
||||||
|
name_split = []
|
||||||
|
if len(split_by) > 0:
|
||||||
|
name_split = simplifyString(nzb_name).split(split_by)
|
||||||
if name_split[0].strip() == '':
|
if name_split[0].strip() == '':
|
||||||
score += 10
|
score += 10
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user