Improve searchForSeries
Refactor removearticles to only remove articles Add normalization on the search string and the series name results Searching now only compares ASCII a-z and 0-9 and all other characters are replaced with single space, this is done to both the search string and the result. This fixes an with names that are separated by a hyphen (-) in the filename but in the Comic Vine name are separated by a slash (/) and other similar issues.
This commit is contained in:
parent
4c103d1ad8
commit
9abd8f0cc8
@ -148,16 +148,6 @@ def removearticles(text):
|
|||||||
|
|
||||||
newText = newText[:-1]
|
newText = newText[:-1]
|
||||||
|
|
||||||
# now get rid of some other junk
|
|
||||||
newText = newText.replace(":", "")
|
|
||||||
newText = newText.replace(",", "")
|
|
||||||
newText = newText.replace("-", " ")
|
|
||||||
|
|
||||||
# since the CV API changed, searches for series names with periods
|
|
||||||
# now explicitly require the period to be in the search key,
|
|
||||||
# so the line below is removed (for now)
|
|
||||||
#newText = newText.replace(".", "")
|
|
||||||
|
|
||||||
return newText
|
return newText
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user