forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-08-13 20:55:59 +02:00
parent bbb7046a76
commit 507b742b97
2 changed files with 3 additions and 4 deletions

View File

@ -13,12 +13,11 @@ def app_config(x):
return app.config.get(x)
@app.template_filter("post_embed")
def post_embed(id):
def post_embed(id, v):
try: id = int(id)
except: return None
p = get_post(id, graceful=True)
if hasattr(g, 'v') and g.v: return render_template("submission_listing.html", listing=[p], v=g.v)
else: return render_template("submission_listing.html", listing=[p], postembed=True)
return render_template("submission_listing.html", listing=[p], v=v)

View File

@ -308,7 +308,7 @@
<div class="row no-gutters">
<div id="frontpage" class="col-12 pt-0">
<div class="posts" id="posts">
{{ p.embed_url | post_embed | safe }}
{{ p.embed_url | post_embed(v) | safe }}
</div>
</div>
</div>