Bold Denuvo cracks.
This commit is contained in:
parent
54bf9902b9
commit
6cd8e69f3f
|
@ -23,13 +23,17 @@ def popularity(release: Release):
|
|||
|
||||
|
||||
def row(release: Release):
|
||||
# Bold row if Denuvo crack. We're checking this first so as to not actually insert 'DENUVO' as a highlight
|
||||
highlights = [h for h in release.highlights if h not in ("DENUVO",)] # avoids modifying original release object
|
||||
bold = highlights != release.highlights
|
||||
|
||||
# The rows in the table containing updates will use the full rls_name as the name, while tables
|
||||
# containing game and DLC releases will show tags and highlights, as well as the stylized game_name.
|
||||
if release.type == ReleaseType.UPDATE:
|
||||
name = f"[{release.rls_name}]({release.nfo_link})"
|
||||
else:
|
||||
tags = " ({})".format(" ".join(release.tags)) if release.tags else ""
|
||||
highlights = " **- {}**".format(", ".join(release.highlights)) if release.highlights else ""
|
||||
highlights = " **- {}**".format(", ".join(highlights)) if highlights else ""
|
||||
name = "[{}{}]({}){}".format(util.markdown_escape(release.game_name),
|
||||
tags,
|
||||
release.nfo_link,
|
||||
|
@ -43,7 +47,11 @@ def row(release: Release):
|
|||
num_reviews_humanized = util.humanize(release.num_reviews, precision=1, prefix="dec", suffix="")
|
||||
reviews = f"{release.score:.0%} ({num_reviews_humanized})"
|
||||
|
||||
return name, release.group, stores, reviews
|
||||
r = (name, release.group, stores, reviews)
|
||||
if bold:
|
||||
r = tuple(f"**{c.replace('**', '')}**" for c in r) # .replace ensures no nested bold, which is unsupported
|
||||
|
||||
return r
|
||||
|
||||
|
||||
def generate_post(releases: Releases) -> str:
|
||||
|
|
Reference in a new issue