mirror of
https://github.com/evilhero/mylar
synced 2024-12-26 01:26:50 +00:00
FIX:(#1247) When . used in lieu of spaces within filenames, would fail to parse names properly depending on the series, FIX: If a series was newly added during the last few commits, would not update the DynamicComicName properly
This commit is contained in:
parent
55ad4f08dc
commit
77cb97ca7f
4 changed files with 10 additions and 3 deletions
|
@ -1678,7 +1678,7 @@ def dbcheck():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
c.execute('SELECT DynamicComicName from comics')
|
c.execute('SELECT DynamicComicName from comics')
|
||||||
if DYNAMIC_UPDATE < 1:
|
if DYNAMIC_UPDATE < 2:
|
||||||
dynamic_upgrade = True
|
dynamic_upgrade = True
|
||||||
else:
|
else:
|
||||||
dynamic_upgrade = False
|
dynamic_upgrade = False
|
||||||
|
|
|
@ -257,6 +257,12 @@ class FileChecker(object):
|
||||||
|
|
||||||
sf3 = re.compile(ur"[^,\s_]+", re.UNICODE)
|
sf3 = re.compile(ur"[^,\s_]+", re.UNICODE)
|
||||||
split_file3 = sf3.findall(modfilename)
|
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
|
#print split_file3
|
||||||
ret_sf2 = ' '.join(split_file3)
|
ret_sf2 = ' '.join(split_file3)
|
||||||
|
|
||||||
|
|
|
@ -1151,7 +1151,7 @@ def upgrade_dynamic():
|
||||||
myDB.upsert("Comics", newVal, CtrlVal)
|
myDB.upsert("Comics", newVal, CtrlVal)
|
||||||
|
|
||||||
logger.info('Finshed updating ' + str(len(dynamic_list)) + ' entries within the db.')
|
logger.info('Finshed updating ' + str(len(dynamic_list)) + ' entries within the db.')
|
||||||
mylar.DYNAMIC_UPDATE = 1
|
mylar.DYNAMIC_UPDATE = 2
|
||||||
mylar.config_write()
|
mylar.config_write()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -515,7 +515,8 @@ def addComictoDB(comicid, mismatch=None, pullupd=None, imported=None, ogcname=No
|
||||||
#dynamic-name generation here.
|
#dynamic-name generation here.
|
||||||
as_d = filechecker.FileChecker(watchcomic=comic['ComicName'])
|
as_d = filechecker.FileChecker(watchcomic=comic['ComicName'])
|
||||||
as_dinfo = as_d.dynamic_replace(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}
|
controlValueDict = {"ComicID": comicid}
|
||||||
newValueDict = {"ComicName": comic['ComicName'],
|
newValueDict = {"ComicName": comic['ComicName'],
|
||||||
|
|
Loading…
Reference in a new issue