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">
|
<div id="paddingheader">
|
||||||
<h1 class="clearfix"><img src="interfaces/default/images/icon_history.png" alt="History"/>History</h1>
|
<h1 class="clearfix"><img src="interfaces/default/images/icon_history.png" alt="History"/>History</h1>
|
||||||
</div>
|
</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">
|
<table class="display" id="history_table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th id="select" align="left"><input type="checkbox" onClick="toggle(this)" class="checkbox" /></th>
|
||||||
<th id="dateadded">Date Added</th>
|
<th id="dateadded">Date Added</th>
|
||||||
<th id="filename">Comic Name</th>
|
<th id="filename">Comic Name</th>
|
||||||
<th id="issue">Issue</th>
|
<th id="issue">Issue</th>
|
||||||
|
@ -42,6 +57,7 @@
|
||||||
|
|
||||||
%>
|
%>
|
||||||
<tr class="grade${grade}">
|
<tr class="grade${grade}">
|
||||||
|
<td id="select"><input type="checkbox" name="${item['IssueID']}" class="checkbox" /></td>
|
||||||
<td id="dateadded">${item['DateAdded']}</td>
|
<td id="dateadded">${item['DateAdded']}</td>
|
||||||
<td id="filename">${item['ComicName']}</td>
|
<td id="filename">${item['ComicName']}</td>
|
||||||
<td id="issue">${item['Issue_Number']}</td>
|
<td id="issue">${item['Issue_Number']}</td>
|
||||||
|
@ -51,6 +67,9 @@
|
||||||
%endfor
|
%endfor
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="headIncludes()">
|
<%def name="headIncludes()">
|
||||||
|
|
|
@ -574,11 +574,19 @@ class PostProcessor(object):
|
||||||
if mylar.ENABLE_META:
|
if mylar.ENABLE_META:
|
||||||
self._log("Metatagging enabled - proceeding...")
|
self._log("Metatagging enabled - proceeding...")
|
||||||
logger.fdebug("Metatagging enabled - proceeding...")
|
logger.fdebug("Metatagging enabled - proceeding...")
|
||||||
import cmtagmylar
|
pcheck = "pass"
|
||||||
if ml is None:
|
try:
|
||||||
pcheck = cmtagmylar.run(self.nzb_folder, issueid=issueid)
|
import cmtagmylar
|
||||||
else:
|
if ml is None:
|
||||||
pcheck = cmtagmylar.run(self.nzb_folder, issueid=issueid, manual="yes", filename=ml['ComicLocation'])
|
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":
|
if pcheck == "fail":
|
||||||
self._log("Unable to write metadata successfully - check mylar.log file. Attempting to continue without tagging...")
|
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...")
|
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 = {}
|
watchmatch = {}
|
||||||
comiclist = []
|
comiclist = []
|
||||||
comiccnt = 0
|
comiccnt = 0
|
||||||
not_these = ['\#',
|
not_these = ['#',
|
||||||
',',
|
',',
|
||||||
'\/',
|
'\/',
|
||||||
':',
|
':',
|
||||||
|
@ -181,8 +181,14 @@ def listFiles(dir,watchcomic,AlternateSearch=None):
|
||||||
logger.fdebug("negative issue detected.")
|
logger.fdebug("negative issue detected.")
|
||||||
#detneg = "yes"
|
#detneg = "yes"
|
||||||
elif j > findtitlepos:
|
elif j > findtitlepos:
|
||||||
logger.fdebug("special character appears outside of title - ignoring @ position: " + str(charpos[i]))
|
if subname[j:] == '#':
|
||||||
nonocount-=1
|
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
|
i+=1
|
||||||
|
|
||||||
#remove versioning here
|
#remove versioning here
|
||||||
|
|
|
@ -255,7 +255,7 @@ def addComictoDB(comicid,mismatch=None,pullupd=None,imported=None,ogcname=None):
|
||||||
# let's remove the non-standard characters here.
|
# let's remove the non-standard characters here.
|
||||||
u_comicnm = comic['ComicName']
|
u_comicnm = comic['ComicName']
|
||||||
u_comicname = u_comicnm.encode('ascii', 'ignore').strip()
|
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
|
comicdir = u_comicname
|
||||||
for dbd in dirbad:
|
for dbd in dirbad:
|
||||||
if dbd in u_comicname:
|
if dbd in u_comicname:
|
||||||
|
|
|
@ -442,7 +442,7 @@ class WebInterface(object):
|
||||||
newaction = action
|
newaction = action
|
||||||
for IssueID in args:
|
for IssueID in args:
|
||||||
#print ("issueID: " + str(IssueID) + "... " + str(newaction))
|
#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
|
continue
|
||||||
else:
|
else:
|
||||||
mi = myDB.action("SELECT * FROM issues WHERE IssueID=?",[IssueID]).fetchone()
|
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))
|
logger.info(u"Marking %s %s as %s" % (mi['ComicName'], mi['Issue_Number'], newaction))
|
||||||
#updater.forceRescan(mi['ComicID'])
|
#updater.forceRescan(mi['ComicID'])
|
||||||
issuestoArchive.append(IssueID)
|
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))
|
logger.info(u"Marking %s %s as %s" % (mi['ComicName'], mi['Issue_Number'], newaction))
|
||||||
issuesToAdd.append(IssueID)
|
issuesToAdd.append(IssueID)
|
||||||
elif action == 'Skipped':
|
elif action == 'Skipped':
|
||||||
logger.info(u"Marking " + str(IssueID) + " as Skipped")
|
logger.info(u"Marking " + str(IssueID) + " as Skipped")
|
||||||
|
elif action == 'Clear':
|
||||||
|
myDB.action("DELETE FROM snatched WHERE IssueID=?", [IssueID])
|
||||||
controlValueDict = {"IssueID": IssueID}
|
controlValueDict = {"IssueID": IssueID}
|
||||||
newValueDict = {"Status": newaction}
|
newValueDict = {"Status": newaction}
|
||||||
myDB.upsert("issues", newValueDict, controlValueDict)
|
myDB.upsert("issues", newValueDict, controlValueDict)
|
||||||
|
|
Loading…
Reference in a new issue