mirror of
https://github.com/evilhero/mylar
synced 2025-03-11 22:42:47 +00:00
FIX:(#1578) Uncaught exceptions on manual search with torrents, FIX:(#1399) RSSCheck spamming the console, FIX: Numerical Sorting not working correctly on home page and comic details pages
This commit is contained in:
parent
651535581f
commit
44a92cacec
3 changed files with 82 additions and 154 deletions
|
@ -70,8 +70,7 @@
|
|||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">Comic Details</a></li>
|
||||
<li><a href="#tabs-2">Download settings</a></li>
|
||||
<li><a href="#tabs-3">Edit Settings</a></li>
|
||||
<li><a href="#tabs-2">Edit Settings</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="tabs-1">
|
||||
|
@ -193,85 +192,7 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="tabs-2">
|
||||
<table class="comictable" summary="Download Settings">
|
||||
<tr>
|
||||
<td id="mainimg">
|
||||
<fieldset>
|
||||
<div id="artistImg">
|
||||
<img src="${comic['ComicImage']}" alt="" height="400" width="263" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</td>
|
||||
<td width="100%" padding="10">
|
||||
%if comic['ComicPublisher'] == 'DC Comics':
|
||||
<img src="interfaces/default/images/publisherlogos/logo-dccomics.png" align="right" alt="DC" height="50" width="50">
|
||||
%elif comic['ComicPublisher'] == 'Marvel':
|
||||
<img src="interfaces/default/images/publisherlogos/logo-marvel.jpg" align="right" alt="Marvel" height="50" width="100">
|
||||
%elif comic['ComicPublisher'] == 'Image':
|
||||
<img src="interfaces/default/images/publisherlogos/logo-imagecomics.png" align="right" alt="Image" height="100" width="50"/>
|
||||
%elif comic['ComicPublisher'] == 'Dark Horse Comics':
|
||||
<img src="interfaces/default/images/publisherlogos/logo-darkhorse.png" align="right" alt="Darkhorse" height="75" width="50"/>
|
||||
%elif comic['ComicPublisher'] == 'IDW Publishing':
|
||||
<img src="interfaces/default/images/publisherlogos/logo-idwpublish.png" align="right" alt="IDW" height="50" width="100"/>
|
||||
%endif
|
||||
<fieldset>
|
||||
<div>
|
||||
<label><big>Alternate versions :</big><norm>${comic['ComicVersion']}</norm></label>
|
||||
</div>
|
||||
<div>
|
||||
<label><big>Scanner :</big><norm>${comic['QUALscanner']}</norm></label>
|
||||
</div>
|
||||
<div>
|
||||
<label><big>Type :</big><norm>${comic['QUALtype']}</norm></label>
|
||||
</div>
|
||||
<div>
|
||||
<label><big>Quality :</big><norm>${comic['QUALquality']}</norm></label>
|
||||
</div>
|
||||
<div>
|
||||
<label><big>Alternate Search Names :</big>
|
||||
<%
|
||||
import re
|
||||
AS_Alternate = []
|
||||
if comic['AlternateSearch'] is None:
|
||||
AS_Alternate.append("None")
|
||||
else:
|
||||
chkthealt = comic['AlternateSearch'].split('##')
|
||||
if chkthealt == 0:
|
||||
AS_Alternate.append(comic['AlternateSearch'])
|
||||
for calt in chkthealt:
|
||||
AS_Alternate.append(re.sub('##','',calt))
|
||||
%>
|
||||
<UL><UL>
|
||||
%for AS in AS_Alternate:
|
||||
<LI><norm>${AS}</norm>
|
||||
%endfor
|
||||
</UL></UL>
|
||||
</label>
|
||||
</div>
|
||||
<%
|
||||
if comic['UseFuzzy'] == "0" or comic['UseFuzzy'] is None:
|
||||
fuzzy = "None"
|
||||
fuzzy_year = "0"
|
||||
elif comic['UseFuzzy'] == "1":
|
||||
fuzzy = "Remove Year"
|
||||
fuzzy_year = "1"
|
||||
elif comic['UseFuzzy'] == "2":
|
||||
fuzzy = "Fuzzy Year"
|
||||
fuzzy_year = "2"
|
||||
|
||||
%>
|
||||
|
||||
<div>
|
||||
<label><big>Fuzzy Year logic : </big><norm>${fuzzy} </norm></label>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="tabs-3">
|
||||
<div id="tabs-2">
|
||||
<table class="comictable" summary="Edit Settings">
|
||||
<tr>
|
||||
<td id="mainimg">
|
||||
|
@ -530,7 +451,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<table class="display_no_select" id="annual_table">
|
||||
<table class="display" id="annual_table">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -841,49 +762,50 @@
|
|||
initActions();
|
||||
$('#issue_table').dataTable(
|
||||
{
|
||||
"bDestroy": true,
|
||||
"aoColumnDefs": [
|
||||
{ 'bSortable': false, 'aTargets': [ 0, 3 ] },
|
||||
{ 'bVisible': false, 'aTargets': [1] },
|
||||
{ 'sType': 'numeric', 'aTargets': [1] },
|
||||
{ 'columns.orderData': [1], 'aTargets': [2] }
|
||||
"destroy": true,
|
||||
"columnDefs": [
|
||||
{ "orderable": false, "targets": [0, 6] },
|
||||
{ "visible": false, "targets": 1 },
|
||||
{ "orderData": 1, "targets": 2 },
|
||||
{ "type": 'num', "targets": 1 },
|
||||
{ "order": [[1, 'desc']] }
|
||||
],
|
||||
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, 'All' ]],
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"Show _MENU_ issues per page",
|
||||
"sEmptyTable": "No issue information available",
|
||||
"sInfo":"Showing _TOTAL_ issues",
|
||||
"sInfoEmpty":"Showing 0 to 0 of 0 issues",
|
||||
"sInfoFiltered":"(filtered from _MAX_ total issues)",
|
||||
"sSearch": ""},
|
||||
"bStateSave": true,
|
||||
"iDisplayLength": 25,
|
||||
"sPaginationType": "full_numbers",
|
||||
"aaSorting": [[1, 'desc'],[4,'desc']]
|
||||
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, 'All' ]],
|
||||
"language": {
|
||||
"lengthMenu":"Show _MENU_ issues per page",
|
||||
"emptyTable": "No issue information available",
|
||||
"info":"Showing _TOTAL_ issues",
|
||||
"infoEmpty":"Showing 0 to 0 of 0 issues",
|
||||
"infoFiltered":"(filtered from _MAX_ total issues)",
|
||||
"search": ""},
|
||||
"stateSave": true,
|
||||
"searching": true,
|
||||
"pageLength": 25,
|
||||
"pagingType": "full_numbers"
|
||||
});
|
||||
$('#annual_table').dataTable(
|
||||
{
|
||||
"bDestroy": true,
|
||||
"aoColumnDefs": [
|
||||
{ 'bSortable': false, 'aTargets': [ 0, 3 ] },
|
||||
{ 'bVisible': false, 'aTargets': [1] },
|
||||
{ 'sType': 'numeric', 'aTargets': [1] },
|
||||
{ 'columns.orderData': [1], 'aTargets': [2] }
|
||||
"destroy": true,
|
||||
"columnDefs": [
|
||||
{ "orderable": false, "targets": [0, 6] },
|
||||
{ "visible": false, "targets": 1 },
|
||||
{ "orderData": 1, "targets": 2 },
|
||||
{ "type": 'num', "targets": 1 },
|
||||
{ "order": [[1, 'desc']] }
|
||||
],
|
||||
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, 'All' ]],
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"",
|
||||
"sEmptyTable": "No issue information available",
|
||||
"sInfo":"Showing _TOTAL_ issues",
|
||||
"sInfoEmpty":"Showing 0 to 0 of 0 issues",
|
||||
"sInfoFiltered":"",
|
||||
"sSearch": ""},
|
||||
"bStateSave": true,
|
||||
"bFilter": false,
|
||||
"sPaginationType": "full_numbers",
|
||||
"iDisplayLength": 10
|
||||
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, 'All' ]],
|
||||
"language": {
|
||||
"lengthMenu":"Show _MENU_ annuals per page",
|
||||
"emptyTable": "No annual information available",
|
||||
"info":"Showing _TOTAL_ annuals",
|
||||
"infoEmpty":"Showing 0 to 0 of 0 annuals",
|
||||
"infoFiltered":"(filtered from _MAX_ total annuals)",
|
||||
"search": ""},
|
||||
"stateSave": true,
|
||||
"searching": false,
|
||||
"pageLength": 10,
|
||||
"pagingType": "full_numbers"
|
||||
});
|
||||
|
||||
resetFilters("issue", "annual");
|
||||
setTimeout(function(){
|
||||
initFancybox();
|
||||
|
@ -891,8 +813,7 @@
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$("issue_table").dataTable();
|
||||
$("annual_table").dataTable();
|
||||
$('table.display').DataTable();
|
||||
initThisPage();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -32,6 +32,12 @@
|
|||
if comic['percent'] < 100:
|
||||
css = '<div class=\"progress-container missing\">'
|
||||
|
||||
if any([comic['haveissues'] == 'None', comic['haveissues'] is None]):
|
||||
hissues = 0
|
||||
else:
|
||||
hissues = comic['haveissues']
|
||||
comic_percent = comic['percent'] + hissues
|
||||
|
||||
if comic['Status'] == 'Paused':
|
||||
grade = 'X'
|
||||
elif comic['Status'] == 'Loading':
|
||||
|
@ -48,7 +54,7 @@
|
|||
<td id="year"><span title="${comic['ComicYear']}"></span>${comic['ComicYear']}</td>
|
||||
<td id="issue"><span title="${comic['LatestIssue']}"></span># ${comic['LatestIssue']}</td>
|
||||
<td id="published">${comic['LatestDate']}</td>
|
||||
<td class="hidden" id="have_percent">${comic['percent']}</td>
|
||||
<td class="hidden" id="have_percent">${comic_percent}</td>
|
||||
<td id="have"><span title="${comic['percent']}"></span>${css}<div style="width:${comic['percent']}%"><span class="progressbar-front-text">${comic['haveissues']}/${comic['totalissues']}</span></div></td>
|
||||
<td id="status">${comic['recentstatus']}</td>
|
||||
<td id="active" align="center">
|
||||
|
@ -82,26 +88,26 @@
|
|||
function initThisPage() {
|
||||
$('#series_table').dataTable(
|
||||
{
|
||||
"bDestroy": true,
|
||||
"aoColumnDefs": [
|
||||
{ 'bSortable': false, 'aTargets': [5, 9] },
|
||||
{ 'bVisible': false, 'aTargets': [5, 9] },
|
||||
{ 'sType': 'numeric', 'aTargets': [5] },
|
||||
{ 'columns.orderData': [5], 'aTargets': [6] },
|
||||
{ 'columns.orderData': [9], 'aTargets': [8] }
|
||||
"destroy": true,
|
||||
"columnDefs": [
|
||||
{ "orderable": false, "targets": [5, 9] },
|
||||
{ "visible": false, "targets": [5, 9] },
|
||||
{ "type": 'num', "targets": 5 },
|
||||
{ "orderData": 5, "targets": 6 },
|
||||
{ "orderData": 9, "targets": 8 },
|
||||
{ "order": [[7, 'asc'],[1, 'asc']] }
|
||||
],
|
||||
"aLengthMenu": [[10, 15, 25, 50, -1], [10, 15, 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": [[7,'asc'],[1,'asc']],
|
||||
"lengthMenu": [[10, 15, 25, 50, -1], [10, 15, 25, 50, 'All' ]],
|
||||
"language": {
|
||||
"lengthMenu":"Show _MENU_ results per page",
|
||||
"emptyTable": "No results",
|
||||
"info":"Showing _START_ to _END_ of _TOTAL_ results",
|
||||
"infoEmpty":"Showing 0 to 0 of 0 results",
|
||||
"infoFiltered":"(filtered from _MAX_ total results)",
|
||||
"search" : ""},
|
||||
"stateSave": true,
|
||||
"pageLength": 25,
|
||||
"pagingType": "full_numbers",
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -307,7 +307,6 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
|
|||
|
||||
if any([allow_packs is None, allow_packs == 'None', allow_packs == 0]) and all([mylar.ENABLE_TORRENT_SEARCH, mylar.ENABLE_32P]):
|
||||
allow_packs = False
|
||||
logger.info('allow_packs set to :' + str(allow_packs))
|
||||
|
||||
newznab_local = False
|
||||
|
||||
|
@ -1232,19 +1231,16 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
|
|||
else:
|
||||
nzbprov = 'DEM'
|
||||
|
||||
logger.info(nzbprov)
|
||||
logger.info('rss:' + RSS)
|
||||
logger.info('allow_packs:' + str(allow_packs))
|
||||
if nzbprov == '32P' and allow_packs and RSS == 'no':
|
||||
logger.info('pack:' + entry['pack'])
|
||||
logger.fdebug('pack:' + entry['pack'])
|
||||
if all([nzbprov == '32P', RSS == 'no', allow_packs]) and any([entry['pack'] == '1', entry['pack'] == '2']):
|
||||
if nzbprov == '32P':
|
||||
if entry['pack'] == '2':
|
||||
logger.info('[PACK-QUEUE] Diamond FreeLeech Pack detected.')
|
||||
logger.fdebug('[PACK-QUEUE] Diamond FreeLeech Pack detected.')
|
||||
elif entry['pack'] == '1':
|
||||
logger.info('[PACK-QUEUE] Normal Pack detected. Checking available inkdrops prior to downloading.')
|
||||
logger.fdebug('[PACK-QUEUE] Normal Pack detected. Checking available inkdrops prior to downloading.')
|
||||
else:
|
||||
logger.info('[PACK-QUEUE] Invalid Pack.')
|
||||
logger.fdebug('[PACK-QUEUE] Invalid Pack.')
|
||||
|
||||
#find the pack range.
|
||||
pack_issuelist = entry['issues']
|
||||
|
@ -1253,7 +1249,7 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
|
|||
if issueid_info['valid'] == True:
|
||||
logger.info('Issue Number ' + IssueNumber + ' exists within pack. Continuing.')
|
||||
else:
|
||||
logger.info('Issue Number ' + IssueNumber + ' does NOT exist within this pack. Skipping')
|
||||
logger.fdebug('Issue Number ' + IssueNumber + ' does NOT exist within this pack. Skipping')
|
||||
continue
|
||||
|
||||
#pack support.
|
||||
|
@ -1571,7 +1567,9 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
|
|||
|
||||
#generate nzbname
|
||||
nzbname = nzbname_create(nzbprov, info=comicinfo, title=ComicTitle) #entry['title'])
|
||||
|
||||
if nzbname is None:
|
||||
logger.error('[NZBPROVIDER = NONE] Encountered an error using given provider with requested information: ' + comicinfo + '. You have a blank entry most likely in your newznabs, fix it & restart Mylar')
|
||||
continue
|
||||
#generate the send-to and actually send the nzb / torrent.
|
||||
searchresult = searcher(nzbprov, nzbname, comicinfo, entry['link'], IssueID, ComicID, tmpprov, newznab=newznab_host)
|
||||
|
||||
|
@ -1878,7 +1876,7 @@ def nzbname_create(provider, title=None, info=None):
|
|||
# it searches nzblog which contains the nzbname to pull out the IssueID and start the post-processing
|
||||
# it is also used to keep the hashinfo for the nzbname in case it fails downloading, it will get put into the failed db for future exclusions
|
||||
|
||||
if mylar.USE_BLACKHOLE and provider != '32P' and provider != 'TPSE':
|
||||
if mylar.USE_BLACKHOLE and any([provider != '32P', provider != 'TPSE', provider != 'WWT', provider != 'DEM']):
|
||||
if os.path.exists(mylar.BLACKHOLE_DIR):
|
||||
#load in the required info to generate the nzb names when required (blackhole only)
|
||||
ComicName = info[0]['ComicName']
|
||||
|
@ -1933,8 +1931,11 @@ def nzbname_create(provider, title=None, info=None):
|
|||
nzbname = re.sub(match.group(), '', nzbname).strip()
|
||||
logger.fdebug('[SEARCHER] end nzbname: ' + nzbname)
|
||||
|
||||
logger.fdebug("nzbname used for post-processing:" + nzbname)
|
||||
return nzbname
|
||||
if nzbname is None:
|
||||
return None
|
||||
else:
|
||||
logger.fdebug("nzbname used for post-processing:" + nzbname)
|
||||
return nzbname
|
||||
|
||||
def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, directsend=None, newznab=None):
|
||||
alt_nzbname = None
|
||||
|
|
Loading…
Add table
Reference in a new issue