Fully working version (?)

This commit is contained in:
mez 2024-03-24 17:26:33 +00:00
commit 9fe7dad24f
10 changed files with 474 additions and 196 deletions

View file

@ -177,20 +177,25 @@ def playcard(game,local=False,decay=False):
for console in variables.consoles:
if game["console"] == console["code"]:
cardstring += console["name"]
cardstring += "</p>\n </div>\n <div>\n <label>Last Updated</label>\n <p>" + game["lastupdate"].strftime("%Y-%m-%d") + "</p>\n </div>\n </div>\n </div>\n <div class=\"history\">\n <div class=\"box_1\">\n <h2>Milestones</h2>\n <div class=\"list\">\n <div>\n <div>" + game["initialdate"].strftime("%Y-%m-%d") + "</div>\n <div>\n Added</div>\n </div>\n"
cardstring += "</p>\n </div>\n <div>\n <label>Last Updated</label>\n <p>" + game["lastupdate"].strftime("%Y-%m-%d") + "</p>\n </div>\n </div>\n </div>\n <div class=\"history\">\n <div class=\"box_1\">\n <h2>Milestones</h2>\n <div class=\"list\">\n <div>\n <div>" + game["initialdate"].strftime("%Y-%m-%d") + "</div>\n <div>\n <div class=\"status-dot Added\"></div>Added</div>\n </div>\n"
try:
if game["firstplayed"]:
cardstring += " <div>\n <div>" + game["firstplayed"].strftime("%Y-%m-%d") + "</div>\n <div>\n Started</div>\n </div>\n"
cardstring += " <div>\n <div>" + game["firstplayed"].strftime("%Y-%m-%d") + "</div>\n <div>\n <div class=\"status-dot "
if game["id"] in variables.endlessgames:
cardstring += "Endless"
else:
cardstring += "Started"
cardstring += "\"></div>Started</div>\n </div>\n"
except:
pass
try:
if game["beaten"]:
cardstring += " <div>\n <div>" + game["beaten"].strftime("%Y-%m-%d") + "</div>\n <div>\n Beaten</div>\n </div>\n"
cardstring += " <div>\n <div>" + game["beaten"].strftime("%Y-%m-%d") + "</div>\n <div>\n <div class=\"status-dot Beaten\"></div>Beaten</div>\n </div>\n"
except:
pass
try:
if game["completed"]:
cardstring += " <div>\n <div>" + game["completed"].strftime("%Y-%m-%d") + "</div>\n <div>\n Completed</div>\n </div>\n"
cardstring += " <div>\n <div>" + game["completed"].strftime("%Y-%m-%d") + "</div>\n <div>\n <div class=\"status-dot Completed\"></div>Completed</div>\n </div>\n"
except:
pass
cardstring += " </div>\n </div>\n </div>\n </div>\n </details>\n"