Show masteries on mass deck pages

master
trémeur 3 days ago
parent e05eb19ae9
commit 136a453cf3

@ -43,6 +43,18 @@ def massseriesgen(series,massindex):
skel.headerwrite(thefile,"mass")
content = open(thefile,"a")
content.write("<h1>" + series + "</h1>\n<p><a href=\"/mass\">back to mass decks page</a></p>\n<p>")
themassdecks = []
for card in massowned[series]:
themassdecks.append(card[:-2])
themassdecks = sorted(list(dict.fromkeys(themassdecks)))
massmastered = []
for deck in themassdecks:
if tcgcore.deckmastered(deck):
massmastered.append(deck)
if len(massmastered) > 0:
for deck in massmastered:
content.write("<img src=\"/decks/" + deck + "/master.gif\" title=\"mastered " + deck + "\">")
content.write("</p><p>")
for card in massowned[series]:
content.write(tcgcore.printcard(card))
content.write("</p>\n")

Loading…
Cancel
Save