mirror of
https://github.com/evilhero/mylar
synced 2025-03-11 22:42:47 +00:00
FIX:(#2012) When importing, if that status of a previous import was 'No Results' would incorrectly display the Select option, When Importing and using the select checkboxes, ComicID's found and listed for the series selected were not being passed and weren't being used during the import sequence as a result
This commit is contained in:
parent
22de99943b
commit
aca08c05e5
2 changed files with 22 additions and 6 deletions
|
@ -106,7 +106,7 @@
|
|||
|
||||
%>
|
||||
<tr class="${result['Status']} grade${grade}">
|
||||
<td id="select"><input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="${result['ComicName']}[${result['Volume']}]" value="${result['DynamicName']}" class="checkbox" />
|
||||
<td id="select"><input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="${result['ComicName']}[${result['Volume']}]|${result['ComicID']}" value="${result['DynamicName']}" class="checkbox" />
|
||||
<td id="comicname">${displayline}
|
||||
%if result['Status'] != 'Imported':
|
||||
<a href="#issue-box" onclick="return runMetaIssue('${result['ComicName'] |u}','${result['DynamicName']}','${result['Volume']}');" class="issue-window"><img src="interfaces/default/images/files.png" height="15 width="15" title="View files in this group" class="highqual" /></a>
|
||||
|
@ -139,7 +139,7 @@
|
|||
[<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']| u}&volume=${result['Volume']}&DynamicName=${result['DynamicName']}&Status=${result['Status']}">Remove</a>]
|
||||
%if result['SRID'] is not None and result['Status'] != 'Imported':
|
||||
%if all([result['SRID'] is not None, result['Status'] != 'Imported', result['Status'] != 'No Results']):
|
||||
[<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']}&Volume=${result['Volume']}">Select</a>]
|
||||
%endif
|
||||
</td>
|
||||
|
|
|
@ -2427,22 +2427,38 @@ class WebInterface(object):
|
|||
if action == 'importselected':
|
||||
logger.info('importing selected series.')
|
||||
for k,v in args.items():
|
||||
#k = Comicname[Volume]
|
||||
#k = Comicname[Volume]|ComicID
|
||||
#v = DynamicName
|
||||
Volst = k.find('[')
|
||||
volume = re.sub('[\[\]]', '', k[Volst:]).strip()
|
||||
comicid_st = k.find('|')
|
||||
if comicid_st == -1:
|
||||
comicid = None
|
||||
volume = re.sub('[\[\]]', '', k[Volst:]).strip()
|
||||
else:
|
||||
comicid = k[comicid_st+1:]
|
||||
if comicid == 'None':
|
||||
comicid = None
|
||||
volume = re.sub('[\[\]]', '', k[Volst:comicid_st]).strip()
|
||||
ComicName = k[:Volst].strip()
|
||||
DynamicName = v
|
||||
cid = ComicName.decode('utf-8', 'replace')
|
||||
comicstoimport.append({'ComicName': cid,
|
||||
'DynamicName': DynamicName,
|
||||
'Volume': volume,
|
||||
'ComicID': None})
|
||||
'ComicID': comicid})
|
||||
|
||||
elif action == 'removeimport':
|
||||
for k,v in args.items():
|
||||
Volst = k.find('[')
|
||||
volume = re.sub('[\[\]]', '', k[Volst:]).strip()
|
||||
comicid_st = k.find('|')
|
||||
if comicid_st == -1:
|
||||
comicid = None
|
||||
volume = re.sub('[\[\]]', '', k[Volst:]).strip()
|
||||
else:
|
||||
comicid = k[comicid_st+1:]
|
||||
if comicid == 'None':
|
||||
comicid = None
|
||||
volume = re.sub('[\[\]]', '', k[Volst:comicid_st]).strip()
|
||||
ComicName = k[:Volst].strip()
|
||||
DynamicName = v
|
||||
if volume is None or volume == 'None':
|
||||
|
|
Loading…
Add table
Reference in a new issue