diff --git a/mylar/__init__.py b/mylar/__init__.py index 973b5da1..cb51e7bd 100755 --- a/mylar/__init__.py +++ b/mylar/__init__.py @@ -1678,7 +1678,7 @@ def dbcheck(): try: c.execute('SELECT DynamicComicName from comics') - if DYNAMIC_UPDATE < 1: + if DYNAMIC_UPDATE < 2: dynamic_upgrade = True else: dynamic_upgrade = False diff --git a/mylar/filechecker.py b/mylar/filechecker.py index 2272b41c..79feb361 100755 --- a/mylar/filechecker.py +++ b/mylar/filechecker.py @@ -257,6 +257,12 @@ class FileChecker(object): sf3 = re.compile(ur"[^,\s_]+", re.UNICODE) split_file3 = sf3.findall(modfilename) + if len(split_file3) == 1: + logger.fdebug('Improperly formatted filename - there is no seperation using appropriate characters between wording.') + sf3 = re.compile(ur"[^,\s_\.]+", re.UNICODE) + split_file3 = sf3.findall(modfilename) + logger.fdebug('NEW split_file3: ' + str(split_file3)) + #print split_file3 ret_sf2 = ' '.join(split_file3) diff --git a/mylar/helpers.py b/mylar/helpers.py index 0c5b60e6..30d862b9 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -1151,7 +1151,7 @@ def upgrade_dynamic(): myDB.upsert("Comics", newVal, CtrlVal) logger.info('Finshed updating ' + str(len(dynamic_list)) + ' entries within the db.') - mylar.DYNAMIC_UPDATE = 1 + mylar.DYNAMIC_UPDATE = 2 mylar.config_write() return diff --git a/mylar/importer.py b/mylar/importer.py index 63d4af12..363a4526 100755 --- a/mylar/importer.py +++ b/mylar/importer.py @@ -515,7 +515,8 @@ def addComictoDB(comicid, mismatch=None, pullupd=None, imported=None, ogcname=No #dynamic-name generation here. as_d = filechecker.FileChecker(watchcomic=comic['ComicName']) as_dinfo = as_d.dynamic_replace(comic['ComicName']) - dynamic_seriesname = as_dinfo['mod_seriesname'] + tmpseriesname = as_dinfo['mod_seriesname'] + dynamic_seriesname = re.sub('[\|\s]','', tmpseriesname.lower()).strip() controlValueDict = {"ComicID": comicid} newValueDict = {"ComicName": comic['ComicName'],