Changed the strictness of name matching, and now sets name to something if not found.
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# @Author: KevinMidboe
|
# @Author: KevinMidboe
|
||||||
# @Date: 2017-04-05 18:40:11
|
# @Date: 2017-04-05 18:40:11
|
||||||
# @Last Modified by: KevinMidboe
|
# @Last Modified by: KevinMidboe
|
||||||
# @Last Modified time: 2017-04-14 17:00:04
|
# @Last Modified time: 2017-05-14 08:17:05
|
||||||
import os.path, hashlib, time, glob, sqlite3, re, json, tweepy
|
import os.path, hashlib, time, glob, sqlite3, re, json, tweepy
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
from fuzzywuzzy import process
|
from fuzzywuzzy import process
|
||||||
@@ -64,10 +64,11 @@ class strayEpisode(object):
|
|||||||
m = re.match(find, self.parent)
|
m = re.match(find, self.parent)
|
||||||
if m:
|
if m:
|
||||||
name, hit = process.extractOne(m.group(0), getShowNames().keys())
|
name, hit = process.extractOne(m.group(0), getShowNames().keys())
|
||||||
if hit >= 90:
|
if hit >= 60:
|
||||||
return name
|
return name
|
||||||
else:
|
else:
|
||||||
# This should be logged or handled somehow
|
# This should be logged or handled somehow
|
||||||
|
return 'Unmatched!'
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def getSeasonNumber(self):
|
def getSeasonNumber(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user