mirror of
https://github.com/evilhero/mylar
synced 2025-02-01 20:11:31 +00:00
FIX: When importing, if search results had a '?' in the year field would cause errors, FIX: Fixed some matching problems when import is determining to auto-match or not based on a year(s), FIX: Delete Import (both selection and checkbox) would not delete in some circumstances, FIX: If the Imort series had a '&', was incorrectly handled
This commit is contained in:
parent
7ff779def2
commit
8ac1918b34
3 changed files with 10 additions and 5 deletions
|
@ -136,9 +136,9 @@
|
|||
<td id="importdate">${result['ImportDate']}</td>
|
||||
<td id="addcomic">
|
||||
%if result['Status'] == 'Not Imported' and result['SRID'] is None:
|
||||
[<a href="#" title="Import ${result['ComicName']} into your watchlist" onclick="doAjaxCall('preSearchit?ComicName=${result['ComicName']| u}&displaycomic=${displayname}| u}&comicid=${result['ComicID']}&volume=${result['Volume']}&dynamicname=${result['DynamicName']}&displayline=${displayline}',$(this),'table')" data-success="Imported ${result['ComicName']}">Import</a>]
|
||||
[<a href="#" title="Import ${result['ComicName']} into your watchlist" onclick="doAjaxCall('preSearchit?ComicName=${result['ComicName']| u}&displaycomic=${displayname}| u}&comicid=${result['ComicID']}&volume=${result['Volume']}&dynamicname=${result['DynamicName']}&displayline=${displayline| u}',$(this),'table')" data-success="Imported ${result['ComicName']}">Import</a>]
|
||||
%endif
|
||||
[<a href="deleteimport?ComicName=${result['ComicName']}&volume=${result['Volume']}&DynamicName=${result['DynamicName']}&Status=${result['Status']}">Remove</a>]
|
||||
[<a href="deleteimport?ComicName=${result['ComicName']| u}&volume=${result['Volume']}&DynamicName=${result['DynamicName']}&Status=${result['Status']}">Remove</a>]
|
||||
%if result['SRID'] is not None and result['Status'] != 'Imported':
|
||||
[<a title="Manual intervention is required - more than one result when attempting to import" href="importresults_popup?SRID=${result['SRID']}&ComicName=${result['ComicName'] |u}&imported=yes&ogcname=${result['ComicName'] |u}&DynamicName=${result['DynamicName']}">Select</a>]
|
||||
%endif
|
||||
|
|
|
@ -291,6 +291,7 @@ def findComic(name, mode, issue, limityear=None, explicit=None, type=None):
|
|||
|
||||
if tmpYr.isdigit():
|
||||
|
||||
yearRange.append(tmpYr)
|
||||
tmpyearRange = int(xmlcnt) / 12
|
||||
if float(tmpyearRange): tmpyearRange +1
|
||||
possible_years = int(tmpYr) + tmpyearRange
|
||||
|
@ -300,6 +301,8 @@ def findComic(name, mode, issue, limityear=None, explicit=None, type=None):
|
|||
yearRange.append(str(i))
|
||||
|
||||
logger.fdebug('[RESULT] ComicName:' + xmlTag + ' -- ' + str(xmlYr) + ' [Series years: ' + str(yearRange) + ']')
|
||||
if tmpYr != xmlYr:
|
||||
xmlYr = tmpYr
|
||||
|
||||
if any([limityear in yearRange, limityear == 'None']):
|
||||
xmlurl = result.getElementsByTagName('site_detail_url')[0].firstChild.wholeText
|
||||
|
|
|
@ -2018,7 +2018,7 @@ class WebInterface(object):
|
|||
DynamicName = v
|
||||
if volume is None or volume == 'None':
|
||||
logger.info('Removing ' + ComicName + ' from the Import list')
|
||||
myDB.action('DELETE from importresults WHERE DynamicName=? AND Volume is NULL', [DynamicName])
|
||||
myDB.action('DELETE from importresults WHERE DynamicName=? AND (Volume is NULL OR Volume="None")', [DynamicName])
|
||||
else:
|
||||
logger.info('Removing ' + ComicName + ' [' + str(volume) + '] from the Import list')
|
||||
myDB.action('DELETE from importresults WHERE DynamicName=? AND Volume=?', [DynamicName, volume])
|
||||
|
@ -3102,7 +3102,7 @@ class WebInterface(object):
|
|||
logname = ComicName + '[' + str(volume) + ']'
|
||||
logger.info("Removing import data for Comic: " + logname)
|
||||
if volume is None or volume == 'None':
|
||||
myDB.action('DELETE from importresults WHERE DynamicName=? AND Volume is NULL AND Status=?', [DynamicName, Status])
|
||||
myDB.action('DELETE from importresults WHERE DynamicName=? AND Status=? AND (Volume is NULL OR Volume="None")', [DynamicName, Status])
|
||||
else:
|
||||
myDB.action('DELETE from importresults WHERE DynamicName=? AND Volume=? AND Status=?', [DynamicName, volume, Status])
|
||||
raise cherrypy.HTTPRedirect("importResults")
|
||||
|
@ -3470,9 +3470,11 @@ class WebInterface(object):
|
|||
'srid': SRID}
|
||||
|
||||
self.addbyid(sr['comicid'], calledby=True, imported=imported, ogcname=ogcname) #imported=yes)
|
||||
else:
|
||||
logger.info('[IMPORT] There is more than one result that might be valid - normally this is due to the filename(s) not having enough information for me to use (ie. no volume label/year). Manual intervention is required.')
|
||||
|
||||
mylar.IMPORTLOCK = False
|
||||
logger.info('Importing finished.')
|
||||
logger.info('[IMPORT] Importing complete.')
|
||||
|
||||
preSearchit.exposed = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue