mirror of https://github.com/evilhero/mylar
FIX: fix for error during post-processing if multiple_dest_dirs was not present for a given series, FIX: set the versions for the comicrn & autoprocess correctly again
This commit is contained in:
parent
1585bd321e
commit
ed55065779
|
@ -132,8 +132,8 @@ COMMITS_BEHIND = None
|
|||
LOCAL_IP = None
|
||||
DOWNLOAD_APIKEY = None
|
||||
CMTAGGER_PATH = None
|
||||
STATIC_COMICRN_VERSION = None
|
||||
STATIC_APC_VERSION = None
|
||||
STATIC_COMICRN_VERSION = "1.01"
|
||||
STATIC_APC_VERSION = "1.0"
|
||||
SCHED = BackgroundScheduler({
|
||||
'apscheduler.executors.default': {
|
||||
'class': 'apscheduler.executors.pool:ThreadPoolExecutor',
|
||||
|
|
|
@ -2504,10 +2504,13 @@ def updatearc_locs(storyarcid, issues):
|
|||
if chk['Status'] == 'Downloaded':
|
||||
pathsrc = os.path.join(chk['ComicLocation'], chk['Location'])
|
||||
if not os.path.exists(pathsrc):
|
||||
if all([mylar.CONFIG.MULTIPLE_DEST_DIRS is not None, mylar.CONFIG.MULTIPLE_DEST_DIRS != 'None', os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(chk['ComicLocation'])) != chk['ComicLocation'], os.path.exists(os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(chk['ComicLocation'])))]):
|
||||
pathsrc = os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(chk['ComicLocation']), chk['Location'])
|
||||
else:
|
||||
logger.fdebug(module + ' file does not exist in location: ' + pathdir + '. Cannot valid location - some options will not be available for this item.')
|
||||
try:
|
||||
if all([mylar.CONFIG.MULTIPLE_DEST_DIRS is not None, mylar.CONFIG.MULTIPLE_DEST_DIRS != 'None', os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(chk['ComicLocation'])) != chk['ComicLocation'], os.path.exists(os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(chk['ComicLocation'])))]):
|
||||
pathsrc = os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(chk['ComicLocation']), chk['Location'])
|
||||
else:
|
||||
logger.fdebug(module + ' file does not exist in location: ' + pathdir + '. Cannot valid location - some options will not be available for this item.')
|
||||
continue
|
||||
except:
|
||||
continue
|
||||
|
||||
# update_iss.append({'IssueID': chk['IssueID'],
|
||||
|
|
|
@ -935,18 +935,21 @@ def forceRescan(ComicID, archive=None, module=None):
|
|||
comiccnt = int(tmpval['comiccount'])
|
||||
#logger.fdebug(module + 'comiccnt is:' + str(comiccnt))
|
||||
fca.append(tmpval)
|
||||
if all([mylar.CONFIG.MULTIPLE_DEST_DIRS is not None, mylar.CONFIG.MULTIPLE_DEST_DIRS != 'None', os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(rescan['ComicLocation'])) != rescan['ComicLocation'], os.path.exists(os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(rescan['ComicLocation'])))]):
|
||||
logger.fdebug(module + 'multiple_dest_dirs:' + mylar.CONFIG.MULTIPLE_DEST_DIRS)
|
||||
logger.fdebug(module + 'dir: ' + rescan['ComicLocation'])
|
||||
logger.fdebug(module + 'os.path.basename: ' + os.path.basename(rescan['ComicLocation']))
|
||||
pathdir = os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(rescan['ComicLocation']))
|
||||
logger.info(module + ' Now checking files for ' + rescan['ComicName'] + ' (' + str(rescan['ComicYear']) + ') in :' + pathdir)
|
||||
mvals = filechecker.FileChecker(dir=pathdir, watchcomic=rescan['ComicName'], Publisher=rescan['ComicPublisher'], AlternateSearch=altnames)
|
||||
tmpv = mvals.listFiles()
|
||||
#tmpv = filechecker.listFiles(dir=pathdir, watchcomic=rescan['ComicName'], Publisher=rescan['ComicPublisher'], AlternateSearch=altnames)
|
||||
logger.fdebug(module + 'tmpv filecount: ' + str(tmpv['comiccount']))
|
||||
comiccnt += int(tmpv['comiccount'])
|
||||
fca.append(tmpv)
|
||||
try:
|
||||
if all([mylar.CONFIG.MULTIPLE_DEST_DIRS is not None, mylar.CONFIG.MULTIPLE_DEST_DIRS != 'None', os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(rescan['ComicLocation'])) != rescan['ComicLocation'], os.path.exists(os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(rescan['ComicLocation'])))]):
|
||||
logger.fdebug(module + 'multiple_dest_dirs:' + mylar.CONFIG.MULTIPLE_DEST_DIRS)
|
||||
logger.fdebug(module + 'dir: ' + rescan['ComicLocation'])
|
||||
logger.fdebug(module + 'os.path.basename: ' + os.path.basename(rescan['ComicLocation']))
|
||||
pathdir = os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(rescan['ComicLocation']))
|
||||
logger.info(module + ' Now checking files for ' + rescan['ComicName'] + ' (' + str(rescan['ComicYear']) + ') in :' + pathdir)
|
||||
mvals = filechecker.FileChecker(dir=pathdir, watchcomic=rescan['ComicName'], Publisher=rescan['ComicPublisher'], AlternateSearch=altnames)
|
||||
tmpv = mvals.listFiles()
|
||||
#tmpv = filechecker.listFiles(dir=pathdir, watchcomic=rescan['ComicName'], Publisher=rescan['ComicPublisher'], AlternateSearch=altnames)
|
||||
logger.fdebug(module + 'tmpv filecount: ' + str(tmpv['comiccount']))
|
||||
comiccnt += int(tmpv['comiccount'])
|
||||
fca.append(tmpv)
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
# files_arc = filechecker.listFiles(dir=archive, watchcomic=rescan['ComicName'], Publisher=rescan['ComicPublisher'], AlternateSearch=rescan['AlternateSearch'])
|
||||
arcval = filechecker.FileChecker(dir=archive, watchcomic=rescan['ComicName'], Publisher=rescan['ComicPublisher'], AlternateSearch=rescan['AlternateSearch'])
|
||||
|
|
|
@ -2042,11 +2042,14 @@ class WebInterface(object):
|
|||
issues = myDB.select("SELECT * FROM issues WHERE ComicID=?", [cid])
|
||||
if mylar.CONFIG.ANNUALS_ON:
|
||||
issues += myDB.select("SELECT * FROM annuals WHERE ComicID=?", [cid])
|
||||
if mylar.CONFIG.MULTIPLE_DEST_DIRS is not None and mylar.CONFIG.MULTIPLE_DEST_DIRS != 'None' and os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(comicdir)) != comicdir:
|
||||
logger.fdebug('multiple_dest_dirs:' + mylar.CONFIG.MULTIPLE_DEST_DIRS)
|
||||
logger.fdebug('dir: ' + comicdir)
|
||||
logger.fdebug('os.path.basename: ' + os.path.basename(comicdir))
|
||||
pathdir = os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(comicdir))
|
||||
try:
|
||||
if mylar.CONFIG.MULTIPLE_DEST_DIRS is not None and mylar.CONFIG.MULTIPLE_DEST_DIRS != 'None' and os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(comicdir)) != comicdir:
|
||||
logger.fdebug('multiple_dest_dirs:' + mylar.CONFIG.MULTIPLE_DEST_DIRS)
|
||||
logger.fdebug('dir: ' + comicdir)
|
||||
logger.fdebug('os.path.basename: ' + os.path.basename(comicdir))
|
||||
pathdir = os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(comicdir))
|
||||
except:
|
||||
pass
|
||||
|
||||
for root, dirnames, filenames in os.walk(comicdir):
|
||||
for filename in filenames:
|
||||
|
@ -3100,12 +3103,14 @@ class WebInterface(object):
|
|||
if issue['Status'] == 'Downloaded':
|
||||
#check multiple destination directory usage here.
|
||||
if not os.path.isfile(issloc):
|
||||
if all([mylar.CONFIG.MULTIPLE_DEST_DIRS is not None, mylar.CONFIG.MULTIPLE_DEST_DIRS != 'None', os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(m_arc['match_filedirectory'])) != issloc, os.path.exists(os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(m_arc['match_filedirectory'])))]):
|
||||
issloc = os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(m_arc['match_filedirectory']), issue['Location'])
|
||||
if not os.path.isfile(issloc):
|
||||
logger.warn('Source file cannot be located. Please do a Recheck for the specific series to ensure everything is correct.')
|
||||
continue
|
||||
|
||||
try:
|
||||
if all([mylar.CONFIG.MULTIPLE_DEST_DIRS is not None, mylar.CONFIG.MULTIPLE_DEST_DIRS != 'None', os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(m_arc['match_filedirectory'])) != issloc, os.path.exists(os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(m_arc['match_filedirectory'])))]):
|
||||
issloc = os.path.join(mylar.CONFIG.MULTIPLE_DEST_DIRS, os.path.basename(m_arc['match_filedirectory']), issue['Location'])
|
||||
if not os.path.isfile(issloc):
|
||||
logger.warn('Source file cannot be located. Please do a Recheck for the specific series to ensure everything is correct.')
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
logger.fdebug('source location set to : ' + issloc)
|
||||
|
||||
if all([mylar.CONFIG.STORYARCDIR, mylar.CONFIG.COPY2ARCDIR]):
|
||||
|
|
Loading…
Reference in New Issue