mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 08:12:41 +00:00
FIX: Improved pack support - will now properly determine issue numbering sequence across packs that contain both a range and individual issues (ie. '1-4, 0')
This commit is contained in:
parent
812e80800c
commit
d438584ab0
1 changed files with 17 additions and 1 deletions
|
@ -2363,7 +2363,23 @@ def issue_find_ids(ComicName, ComicID, pack, IssueNumber):
|
|||
issuelist = myDB.select("SELECT * FROM issues WHERE ComicID=?", [ComicID])
|
||||
|
||||
if 'Annual' not in pack:
|
||||
pack_issues = range(int(pack[:pack.find('-')]),int(pack[pack.find('-')+1:])+1)
|
||||
packlist = [x.strip() for x in pack.split(',')]
|
||||
plist = []
|
||||
pack_issues = []
|
||||
for pl in packlist:
|
||||
if '-' in pl:
|
||||
plist.append(range(int(pl[:pl.find('-')]),int(pl[pl.find('-')+1:])+1))
|
||||
else:
|
||||
plist.append(int(pl))
|
||||
|
||||
for pi in plist:
|
||||
if type(pi) == list:
|
||||
for x in pi:
|
||||
pack_issues.append(x)
|
||||
else:
|
||||
pack_issues.append(pi)
|
||||
|
||||
pack_issues.sort()
|
||||
annualize = False
|
||||
else:
|
||||
#remove the annuals wording
|
||||
|
|
Loading…
Reference in a new issue