Issue Searching for OPDS

This commit is contained in:
DarkSir23 2017-12-07 14:24:25 -05:00 committed by evilhero
parent 994113dd5a
commit 05ac670ccc
1 changed files with 6 additions and 5 deletions

View File

@ -484,17 +484,18 @@ class OPDS(object):
self.data = self._error_with_message('No ComicID Provided') self.data = self._error_with_message('No ComicID Provided')
return return
myDB = db.DBConnection() myDB = db.DBConnection()
issue = myDB.selectone("SELECT * from issues WHERE IssueID=?", (kwargs['issueid'],)).fetchone()
issuetype = 0 issuetype = 0
issue = myDB.selectone("SELECT * from readinglist WHERE IssueID=? and Location IS NOT NULL",
(kwargs['issueid'],)).fetchone()
if not issue: if not issue:
issue = myDB.selectone("SELECT * from annuals WHERE IssueID=?", (kwargs['issueid'],)).fetchone() issue = myDB.selectone("SELECT * from issues WHERE IssueID=?", (kwargs['issueid'],)).fetchone()
if not issue: if not issue:
issue = myDB.selectone("SELECT * from readinglist WHERE IssueID=? and Location IS NOT NULL", (kwargs['issueid'],)).fetchone() issue = myDB.selectone("SELECT * from annuals WHERE IssueID=?", (kwargs['issueid'],)).fetchone()
if not issue: if not issue:
self.data = self._error_with_message('Issue Not Found') self.data = self._error_with_message('Issue Not Found')
return return
else: else:
issuetype = 1 issuetype = 1
comic = myDB.selectone("SELECT * from comics WHERE ComicID=?", (issue['ComicID'],)).fetchone() comic = myDB.selectone("SELECT * from comics WHERE ComicID=?", (issue['ComicID'],)).fetchone()
if not comic: if not comic:
self.data = self._error_with_message('Comic Not Found') self.data = self._error_with_message('Comic Not Found')