Sort fics properly
This commit is contained in:
parent
d1003797f2
commit
663cac35b9
5 changed files with 59 additions and 12 deletions
|
@ -53,6 +53,7 @@ def fandomlist(local=False):
|
|||
fandomlist = sorted(fandomlist, key=lambda d: d["sortname"])
|
||||
for fandom in fandomlist:
|
||||
fandomfics = []
|
||||
sortfics = []
|
||||
# check which fics are in the fandom
|
||||
ficcount = 500
|
||||
while ficcount > 0:
|
||||
|
@ -75,7 +76,11 @@ def fandomlist(local=False):
|
|||
revealed = True
|
||||
if revealed == True:
|
||||
if fandom["searchname"] in fileread.fandom:
|
||||
fandomfics.append(ficcount)
|
||||
ficdict = {"thefic":ficcount,"thedate":(fileread.datewords[-1])["date"]}
|
||||
sortfics.append(ficdict)
|
||||
thefics = sorted(sortfics,key=lambda d: d["thedate"],reverse=True)
|
||||
for fic in thefics:
|
||||
fandomfics.append(fic["thefic"])
|
||||
firstfic = fandomfics[-1]
|
||||
if firstfic < 10:
|
||||
firstficstring = "00" + str(firstfic)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue