diff --git a/lib/utils.py b/lib/utils.py index 4234116..772ff6b 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -193,6 +193,7 @@ def parseNFO(options): def upcaseFirstLetter(s): return s[0].upper() + s[1:] + def cleanString(toclean): toclean = toclean.split(' ') cleaned = '' @@ -201,6 +202,8 @@ def cleanString(toclean): continue strtoclean = unicodedata.normalize('NFKD', unicode (s, 'utf-8')).encode('ASCII', 'ignore') strtoclean = ''.join(e for e in strtoclean if e.isalnum()) + if strtoclean == '': + continue strtoclean = upcaseFirstLetter(strtoclean) cleaned = cleaned + strtoclean