Permalink
Browse files

fix for ' in ComicNames not being able to change status / download'

  • Loading branch information...
evilhero committed Oct 1, 2012
1 parent 75f5834 commit 8d234c5d0580a3a79716ef7b3b4b4f711a7d148b
Showing with 5 additions and 8 deletions.
  1. +2 −2 data/interfaces/default/artistredone.html
  2. +3 −6 mylar/webserve.py
@@ -212,11 +212,11 @@ <h3><i>(Comic information is currently being loaded)</i></h3>
<td id="type">${issue['Type']}</td>
<td id="status">${issue['Status']}
%if issue['Status'] == 'Skipped':
- [<a href="#" onclick="doAjaxCall('queueissue?ComicName=${issue['ComicName']}&ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&ComicYear=${issue['IssueDate']}&mode=want',$(this),'table')">want</a>]
+ [<a href="#" onclick="doAjaxCall('queueissue?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&ComicYear=${issue['IssueDate']}&mode=want',$(this),'table')">want</a>]
%elif (issue['Status'] == 'Wanted'):
[<a href="#" onclick="doAjaxCall('unqueueissue?IssueID=${issue['IssueID']}&ComicID=${issue['ComicID']}',$(this),'table')" data-success="'${issue['Issue_Number']}' has been marked as skipped">skip</a>]
%else:
- [<a href="#" onclick="doAjaxCall('queueissue?ComicName=${issue['ComicName']}&ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&mode=want', $(this),'table')" data-success="Retrying the same version of '${issue['ComicName']}' '${issue['Issue_Number']}'" title="Retry the same download again">retry</a>][<a href="#" onclick="doAjaxCall('queueissue?IssueID=${issue['IssueID']}&ComicID=${issue['ComicID']}&ComicName=${issue['ComicName']}&ComicIssue=${issue['Issue_Number']}&new=True', $(this),'table')" title="Try a new download, skipping all previously tried nzbs" data-success="Downloading new version for '${issue['ComicName']}' '${issue['Issue_Number']}'" data-success="Looking for a new version of '${issue['ComicName']}' '${issue['Issue_Number']}'">new</a>]
+ [<a href="#" onclick="doAjaxCall('queueissue?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&mode=want', $(this),'table')" data-success="Retrying the same version of '${issue['ComicName']}' '${issue['Issue_Number']}'" title="Retry the same download again">retry</a>][<a href="#" onclick="doAjaxCall('queueissue?IssueID=${issue['IssueID']}&ComicID=${issue['ComicID']}&ComicIssue=${issue['Issue_Number']}&new=True', $(this),'table')" title="Try a new download, skipping all previously tried nzbs" data-success="Downloading new version for '${issue['ComicName']}' '${issue['Issue_Number']}'" data-success="Looking for a new version of '${issue['ComicName']}' '${issue['Issue_Number']}'">new</a>]
%endif
</td>
</tr>
View
@@ -168,11 +168,6 @@ def markissues(self, ComicID=None, action=None, **args):
ComicID = mi['ComicID']
#print ("ComicID: " + str(ComicID))
comic = myDB.action('SELECT * FROM comics WHERE ComicID=?', [ComicID]).fetchone()
- #print ("comic location: " + comic['ComicLocation'])
- #fc = filechecker.listFiles(comic['ComicLocation'], mi['ComicName'])
- #HaveDict = {'ComicID': ComicID}
- #newHave = { 'Have': fc['comiccount'] }
- #myDB.upsert("comics", newHave, HaveDict)
controlValueDict = {'IssueID': IssueID}
newValueDict = {'Status': 'Snatched'}
myDB.upsert("issues", newValueDict, controlValueDict)
@@ -198,7 +193,7 @@ def addArtists(self, **args):
raise cherrypy.HTTPRedirect("home")
addArtists.exposed = True
- def queueissue(self, ComicName, mode, ComicID=None, ComicYear=None, ComicIssue=None, IssueID=None, new=False, redirect=None):
+ def queueissue(self, mode, ComicName=None, ComicID=None, ComicYear=None, ComicIssue=None, IssueID=None, new=False, redirect=None):
myDB = db.DBConnection()
#mode dictates type of queue - either 'want' for individual comics, or 'series' for series watchlist.
if ComicID is None and mode == 'series':
@@ -222,6 +217,8 @@ def queueissue(self, ComicName, mode, ComicID=None, ComicYear=None, ComicIssue=N
logger.info(u"Downloaded " + ComicName + " " + ComicIssue )
return
elif mode == 'want':
+ cdname = myDB.action("SELECT ComicName from comics where ComicID=?", [ComicID]).fetchone()
+ ComicName = cdname['ComicName']
logger.info(u"Marking " + ComicName + " issue: " + ComicIssue + " as wanted...")
#---
#this should be on it's own somewhere

0 comments on commit 8d234c5

Please sign in to comment.