mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 13:34:33 +00:00
FIX:If Annual Integration was enabled, then disabled - annual references might remain for some series and cause the Already in Library to be shown when trying to add annuals individually to the watchlist.
This commit is contained in:
parent
f63e746280
commit
8913ba6e61
1 changed files with 14 additions and 5 deletions
|
@ -1848,16 +1848,25 @@ def listLibrary(comicid=None):
|
|||
library = {}
|
||||
myDB = db.DBConnection()
|
||||
if comicid is None:
|
||||
list = myDB.select("SELECT a.comicid, b.releasecomicid, a.status FROM Comics AS a LEFT JOIN annuals AS b on a.comicid=b.comicid group by a.comicid")
|
||||
if mylar.CONFIG.ANNUALS_ON is True:
|
||||
list = myDB.select("SELECT a.comicid, b.releasecomicid, a.status FROM Comics AS a LEFT JOIN annuals AS b on a.comicid=b.comicid group by a.comicid")
|
||||
else:
|
||||
list = myDB.select("SELECT comicid, status FROM Comics group by comicid")
|
||||
else:
|
||||
list = myDB.select("SELECT a.comicid, b.releasecomicid, a.status FROM Comics AS a LEFT JOIN annuals AS b on a.comicid=b.comicid WHERE a.comicid=? group by a.comicid", [re.sub('4050-', '', comicid).strip()])
|
||||
if mylar.CONFIG.ANNUALS_ON is True:
|
||||
list = myDB.select("SELECT a.comicid, b.releasecomicid, a.status FROM Comics AS a LEFT JOIN annuals AS b on a.comicid=b.comicid WHERE a.comicid=? group by a.comicid", [re.sub('4050-', '', comicid).strip()])
|
||||
else:
|
||||
list = myDB.select("SELECT comicid, status FROM Comics WHERE comicid=? group by comicid", [re.sub('4050-', '', comicid).strip()])
|
||||
|
||||
for row in list:
|
||||
library[row['ComicID']] = {'comicid': row['ComicID'],
|
||||
'status': row['Status']}
|
||||
if row['ReleaseComicID'] is not None:
|
||||
library[row['ReleaseComicID']] = {'comicid': row['ComicID'],
|
||||
'status': row['Status']}
|
||||
try:
|
||||
if row['ReleaseComicID'] is not None:
|
||||
library[row['ReleaseComicID']] = {'comicid': row['ComicID'],
|
||||
'status': row['Status']}
|
||||
except:
|
||||
pass
|
||||
|
||||
return library
|
||||
|
||||
|
|
Loading…
Reference in a new issue