1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-26 09:36:53 +00:00
mylar/data/interfaces/default/importresults.html
evilhero 55eedb1869 IMP: Added ALT_PULL=2 method for weeklypull management. Will now update against an external site and pull down already populated ComicID/IssueID's for the series that exist on the pullist. Alternate Search Names aren't needed with this option to match on pullist, as well as CV API Hits are also not used since it is all populated. Also allows for future viewing of pullists (up to 4 weeks in advance), FIX: Alternate search names now will be searched against when doing manual post-processing, FIX: When manually post-processing, if series volume wasn't specified would fail to match against v1 (by default), IMP:(#1309) Https_chain option now allowed within config.ini, IMP: 32P pack support on a per series basis (will search individual torrents first before packs), IMP: When pack is snatched, will mark all issues within pack that are not in a Downloaded status as Snatched within Mylar (annuals currently don't work), IMP: Removed unnecessary config spamming on startup when verbose mode was enabled, IMP: Allow for searching on 32p against series+publisher for some titles that distinguish between series by different publisher, IMP: Better series matching when trying to find series matches on 32P, FIX: When metatagging, if volume label is not provided within Mylar would default to None (now will be v1), IMP:(#1304) Attempt at better file parsing when utf-8 filenames are being parsed, FIX: Proper handling of Infinity issue number when file-checking, FIX: When adding series and annuals were enabled, if annual was a new release, would not be shown on the annual subset table for the given series (and subsequently wouldn't be auto-marked as Wanted), FIX:(#1306) Correct handling of the imported value when doing an import and moving files was selected (would previously error out during moving for some imports), FIX: When cbz files were being imported and were attempted to being auto-imported, would fail due to improper handling of the imported variable, FIX: Manage issues will now default the dropdown to the correct selected option, FIX: Manage Comics - fixed dropdown options for multiple selection of series - delete/pause/resume, IMP: Added 'delete stragglers' option to Story Arcs when deleting an arc to ensure that all traces of the arc are removed from the db, FIX: Manual/group metatagging would not tag properly if the START_YEAR_AS_VOLUME option was enabled, FIX: (#1313) NzbHydra wouldn't set the nzbid properly when using Failed Download handling/Retrying
2016-07-10 18:28:14 -04:00

275 lines
15 KiB
HTML
Executable file

<%inherit file="base.html" />
<%!
import mylar
from mylar import db
from mylar.helpers import checked
%>
<%def name="headerIncludes()">
<div id="subhead_container">
<div id="subhead_menu">
<a id="menu_link_refresh" onclick="doAjaxCall('flushImports', $(this),'table')" data-success="Import Results Flushed">Flush all Imports</a>
<a id="menu_link_refresh" onclick="doAjaxCall('markImports?action=massimport', $(this),'table')" data-success="Successfully started Mass Import of Non-Imported items.">Mass Import</a>
</div>
</div>
</%def>
<%def name="body()">
<div id="paddingheader">
<h1 class="clearfix">Ultron Import Results</h1>
</div>
<div id="tabs">
<ul>
<li><a href="#tabs-1">Import Results</a></li>
</ul>
<div id="tabs-1" class="configtable">
<table>
<tr>
<span style="position:right">
<img src="interfaces/default/images/ultron.png" style="float:right" height="125" width="125" />
<fieldset>
<div class="row checkbox">
<input type="checkbox" name="autoadd" style="vertical-align: middle; margin: 3px; margin-top: -1px;" id="autoadd" value="1" ${checked(mylar.ADD_COMICS)}><label>Auto-add new series</label>
</div>
<div class="row checkbox">
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="imp_move" id="imp_move" value="1" ${checked(mylar.IMP_MOVE)}><label>Move files</label>
</div>
%if mylar.RENAME_FILES:
<div class="row checkbox">
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="imp_rename" id="imp_rename" value="1" ${checked(mylar.IMP_RENAME)}><label>Rename Files </label>
<small>(After importing, Rename the files to configuration settings)</small>
<label>${mylar.FOLDER_FORMAT}/${mylar.FILE_FORMAT}</label>
</div>
%endif
<div class="row checkbox">
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="imp_metadata" id="imp_metadata" value="1" ${checked(mylar.IMP_METADATA)}><label>Use Existing Metadata</label>
<small>(Use existing Metadata to better locate series for import)</small>
</div>
%if mylar.IMPORTLOCK:
<div class="row checkbox">
<input type="checkbox" onclick="<%mylar.IMPORTLOCK = False%>" style="vertical-align: middle; margin: 3px; margin-top: -1px;"><label>Existing Import running. Force next run?</label>
</div>
%endif
</fieldset>
</span>
</tr>
</table>
</div>
</div>
<div class="table_wrapper">
<form action="markImports" method="get" id="markImports">
<div id="markcomic">
<select name="action" onChange="doAjaxCall('markImports',$(this),'table',true);" data-error="You didn't select any comics">
<option disabled="disabled" selected="selected">Choose...</option>
<option value="importselected">Start Import</option>
<option value="removeimport">Remove</option>
</select>
<input type="hidden" value="Go">
</div>
<table class="display" id="impresults_table">
<tr/><tr/>
<tr><center><h3>To be Imported</h3></center></tr>
<thead>
<tr>
<th id="select" align="left"><input type="checkbox" onClick="toggle(this)" name="results" class="checkbox" /></th>
<th id="comicname">Comic Name</th>
<th id="comicyear">Year</th>
<th id="issues">Issues</th>
<th id="status">Status</th>
<th id="importdate">Import Date</th>
<th id="addcomic">Options</th>
</tr>
</thead>
<tbody>
%if results:
%for result in results:
<%
if result['Status'] == 'Imported':
grade = 'X'
elif result['Status'] == 'Manual Intervention':
grade = 'C'
else:
grade = 'Z'
if result['DisplayName'] is None:
displayname = result['ComicName']
else:
displayname = result['DisplayName']
displayline = displayname
if result['AnnualCount'] > 0:
displayline += '(+' + str(result['AnnualCount']) + ' Annuals)'
if all([result['Volume'] is not None, result['Volume'] != 'None']):
displayline += ' (' + str(result['Volume']) + ')'
%>
<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="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>
<div id="issue-box" class="issue-popup">
<a href="#" class="close"><img src="interfaces/default/images/close_pop.png" class="btn_close" title="Close Window" alt="Close" class="highqual" /></a>
<div id="responsethis">
<label><strong>[ NODATA ]</strong></label></br>
</div>
</div>
%endif
%if result['ComicID'] is not None:
[${result['ComicID']}]
%endif
</td>
<td id="comicyear"><title="${result['ComicYear']}">${result['ComicYear']}</td>
<td id="comicissues"><title="${result['IssueCount']}">${result['IssueCount']}</td>
<td id="status">
%if result['ComicID'] and result['Status'] == 'Imported':
<a href="comicDetails?ComicID=${result['ComicID']}">${result['Status']}</a>
%else:
${result['Status']}
%endif
%if result['WatchMatch'] is not None:
<img src="interfaces/default/images/green-circle.png" height="10" width="10"/>
%endif
</td>
<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| 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':
[<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>
</tr>
%endfor
%else:
<tr>
<td colspan="6">
<center><legend>There are no results to display</legend></center>
</td>
</tr>
%endif
</tbody>
</table>
</form>
</div>
</%def>
<%def name="headIncludes()">
<link rel="stylesheet" href="interfaces/default/css/data_table.css">
</%def>
<%def name="javascriptIncludes()">
<script src="js/libs/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function() {
$('a.issue-window').click(function() {
//Getting the variable's value from a link
var issueBox = $(this).attr('href');
//Fade in the Popup
$(issueBox).fadeIn(300);
//Set the center alignment padding + border see css style
var popMargTop = ($(issueBox).height() + 24) / 2;
var popMargLeft = ($(issueBox).width() + 24) / 2;
$(issueBox).css({
'margin-top' : -popMargTop,
'margin-left' : -popMargLeft
});
// Add the mask to body
$('body').append('<div id="mask"></div>');
$('#mask').fadeIn(300);
return false;
});
// When clicking on the button close or the mask layer the popup closed
$('a.close, #mask').on('click', function() {
$('#mask , .issue-popup').fadeOut(300 , function() {
$('#mask').remove();
});
return false;
});
});
</script>
<script>
function runMetaIssue(comicname, dynamicname, volume) {
//alert(comicname);
$.ajax({
type: "GET",
url: "ImportFilelisting",
data: { comicname: comicname, dynamicname: dynamicname, volume: volume },
success: function(response) {
//alert(response)
var names = response
$('#responsethis').html(response);
},
error: function(data)
{
alert('ERROR'+data.responseText);
},
});
}
</script>
<script>
$('.showlog').click(function (event) {
var width = 575,
height = 400,
left = ($(window).width() - width) / 2,
top = ($(window).height() - height) / 2,
url = this.href,
opts = 'status=1' +
',width=' + width +
',height=' + height +
',top=' + top +
',left=' + left;
window.open(url, 'twitte', opts);
return false;
});
</script>
<script>
function initThisPage() {
jQuery( "#tabs" ).tabs();
initActions();
$('#impresults_table').dataTable(
{
"bDestroy": true,
//"aoColumnDefs": [
// { 'bSortable': false, 'aTargets': [ 0 , 2 ] },
// { 'bVisible': false, 'aTargets': [2] },
// { 'sType': 'numeric', 'aTargets': [2] },
// { 'iDataSort': [2], 'aTargets': [3] }
//],
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, 'All' ]],
"oLanguage": {
"sLengthMenu":"Show _MENU_ results per page",
"sEmptyTable": "No results",
"sInfo":"Showing _START_ to _END_ of _TOTAL_ results",
"sInfoEmpty":"Showing 0 to 0 of 0 results",
"sInfoFiltered":"(filtered from _MAX_ total results)",
"sSearch" : ""},
"bStateSave": true,
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
"aaSorting": [2, 'desc']
});
resetFilters("result");
}
$(document).ready(function(){
initThisPage();
});
$(window).load(function(){
initFancybox();
});
</script>
</%def>