mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 13:34:33 +00:00
IMP:(#437) Selections included now in history for selective choices, FIX:(#438) If filenames contained a '#' in filename would not detect properly, FIX: Removal of ' in directory naming, FIX: Added some error-catching for metadata & comictagger
This commit is contained in:
parent
00cf2bf174
commit
8aae168844
5 changed files with 47 additions and 11 deletions
|
@ -18,9 +18,24 @@
|
|||
<div id="paddingheader">
|
||||
<h1 class="clearfix"><img src="interfaces/default/images/icon_history.png" alt="History"/>History</h1>
|
||||
</div>
|
||||
|
||||
<form action="markissues" method="get" id="markissues">
|
||||
<div id="markissue">Mark selected issues as
|
||||
<select name="action" onChange="doAjaxCall('markissues',$(this),'table',true);" data-success="selected issues marked">
|
||||
<option disabled="disabled" selected="selected">Choose...</option>
|
||||
<option value="Retry">Retry</option>
|
||||
<option value="Clear">Clear</option>
|
||||
</select>
|
||||
selected issues
|
||||
<input type="hidden" value="Go">
|
||||
</div>
|
||||
|
||||
<div class="table_wrapper" id="history_table_wrapper">
|
||||
|
||||
<table class="display" id="history_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="select" align="left"><input type="checkbox" onClick="toggle(this)" class="checkbox" /></th>
|
||||
<th id="dateadded">Date Added</th>
|
||||
<th id="filename">Comic Name</th>
|
||||
<th id="issue">Issue</th>
|
||||
|
@ -42,6 +57,7 @@
|
|||
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="select"><input type="checkbox" name="${item['IssueID']}" class="checkbox" /></td>
|
||||
<td id="dateadded">${item['DateAdded']}</td>
|
||||
<td id="filename">${item['ComicName']}</td>
|
||||
<td id="issue">${item['Issue_Number']}</td>
|
||||
|
@ -51,6 +67,9 @@
|
|||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
|
|
|
@ -574,11 +574,19 @@ class PostProcessor(object):
|
|||
if mylar.ENABLE_META:
|
||||
self._log("Metatagging enabled - proceeding...")
|
||||
logger.fdebug("Metatagging enabled - proceeding...")
|
||||
pcheck = "pass"
|
||||
try:
|
||||
import cmtagmylar
|
||||
if ml is None:
|
||||
pcheck = cmtagmylar.run(self.nzb_folder, issueid=issueid)
|
||||
else:
|
||||
pcheck = cmtagmylar.run(self.nzb_folder, issueid=issueid, manual="yes", filename=ml['ComicLocation'])
|
||||
|
||||
except ImportError:
|
||||
logger.fdebug("comictaggerlib not found on system. Ensure the ENTIRE lib directory is located within mylar/lib/comictaggerlib/")
|
||||
logger.fdebug("continuing with PostProcessing, but I'm not using metadata.")
|
||||
pcheck = "fail"
|
||||
|
||||
if pcheck == "fail":
|
||||
self._log("Unable to write metadata successfully - check mylar.log file. Attempting to continue without tagging...")
|
||||
logger.fdebug("Unable to write metadata successfully - check mylar.log file. Attempting to continue without tagging...")
|
||||
|
|
|
@ -40,7 +40,7 @@ def listFiles(dir,watchcomic,AlternateSearch=None):
|
|||
watchmatch = {}
|
||||
comiclist = []
|
||||
comiccnt = 0
|
||||
not_these = ['\#',
|
||||
not_these = ['#',
|
||||
',',
|
||||
'\/',
|
||||
':',
|
||||
|
@ -181,6 +181,12 @@ def listFiles(dir,watchcomic,AlternateSearch=None):
|
|||
logger.fdebug("negative issue detected.")
|
||||
#detneg = "yes"
|
||||
elif j > findtitlepos:
|
||||
if subname[j:] == '#':
|
||||
if subname[i+1].isdigit():
|
||||
logger.fdebug("# detected denoting issue#, ignoring.")
|
||||
else:
|
||||
nonocount-=1
|
||||
else:
|
||||
logger.fdebug("special character appears outside of title - ignoring @ position: " + str(charpos[i]))
|
||||
nonocount-=1
|
||||
i+=1
|
||||
|
|
|
@ -255,7 +255,7 @@ def addComictoDB(comicid,mismatch=None,pullupd=None,imported=None,ogcname=None):
|
|||
# let's remove the non-standard characters here.
|
||||
u_comicnm = comic['ComicName']
|
||||
u_comicname = u_comicnm.encode('ascii', 'ignore').strip()
|
||||
dirbad = [':',',','/','?','!'] #in u_comicname or '/' in u_comicname or ',' in u_comicname or '?' in u_comicname:
|
||||
dirbad = [':',',','/','?','!','\''] #in u_comicname or '/' in u_comicname or ',' in u_comicname or '?' in u_comicname:
|
||||
comicdir = u_comicname
|
||||
for dbd in dirbad:
|
||||
if dbd in u_comicname:
|
||||
|
|
|
@ -442,7 +442,7 @@ class WebInterface(object):
|
|||
newaction = action
|
||||
for IssueID in args:
|
||||
#print ("issueID: " + str(IssueID) + "... " + str(newaction))
|
||||
if IssueID is None or 'issue_table' in IssueID:
|
||||
if IssueID is None or 'issue_table' in IssueID or 'history_table' in IssueID:
|
||||
continue
|
||||
else:
|
||||
mi = myDB.action("SELECT * FROM issues WHERE IssueID=?",[IssueID]).fetchone()
|
||||
|
@ -455,11 +455,14 @@ class WebInterface(object):
|
|||
logger.info(u"Marking %s %s as %s" % (mi['ComicName'], mi['Issue_Number'], newaction))
|
||||
#updater.forceRescan(mi['ComicID'])
|
||||
issuestoArchive.append(IssueID)
|
||||
elif action == 'Wanted':
|
||||
elif action == 'Wanted' or action == 'Retry':
|
||||
if action == 'Retry': newaction = 'Wanted'
|
||||
logger.info(u"Marking %s %s as %s" % (mi['ComicName'], mi['Issue_Number'], newaction))
|
||||
issuesToAdd.append(IssueID)
|
||||
elif action == 'Skipped':
|
||||
logger.info(u"Marking " + str(IssueID) + " as Skipped")
|
||||
elif action == 'Clear':
|
||||
myDB.action("DELETE FROM snatched WHERE IssueID=?", [IssueID])
|
||||
controlValueDict = {"IssueID": IssueID}
|
||||
newValueDict = {"Status": newaction}
|
||||
myDB.upsert("issues", newValueDict, controlValueDict)
|
||||
|
|
Loading…
Reference in a new issue