mirror of https://github.com/evilhero/mylar
New helper function for listing Story Arc IDs and modification to Story Arc Info function to use new helper function
This commit is contained in:
parent
48933364bb
commit
9d97fbdf8e
|
@ -1748,6 +1748,20 @@ def listLibrary():
|
|||
library[row['ReleaseComicId']] = row['ComicID']
|
||||
return library
|
||||
|
||||
def listStoryArcs():
|
||||
import db
|
||||
library = {}
|
||||
myDB = db.DBConnection()
|
||||
# Get Distinct Arc IDs
|
||||
list = myDB.select("SELECT DISTINCT(StoryArcID) FROM readinglist");
|
||||
for row in list:
|
||||
library[row['StoryArcID']] = row['StoryArcID']
|
||||
# Get Distinct CV Arc IDs
|
||||
list = myDB.select("SELECT DISTINCT(CV_ArcID) FROM readinglist");
|
||||
for row in list:
|
||||
library[row['CV_ArcID']] = row['CV_ArcID']
|
||||
return library
|
||||
|
||||
def listIssues(weeknumber, year):
|
||||
import db
|
||||
library = []
|
||||
|
|
|
@ -25,7 +25,7 @@ import requests
|
|||
|
||||
import mylar
|
||||
from mylar import logger, db, cv
|
||||
from mylar.helpers import multikeysort, replace_all, cleanName, listLibrary
|
||||
from mylar.helpers import multikeysort, replace_all, cleanName, listLibrary, listStoryArcs
|
||||
import httplib
|
||||
|
||||
mb_lock = threading.Lock()
|
||||
|
@ -393,7 +393,7 @@ def findComic(name, mode, issue, limityear=None, explicit=None, type=None):
|
|||
|
||||
def storyarcinfo(xmlid):
|
||||
|
||||
comicLibrary = listLibrary()
|
||||
comicLibrary = listStoryArcs()
|
||||
|
||||
arcinfo = {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue