forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-04-04 12:34:49 +02:00
parent f44aedff18
commit 6ca83dcc6c
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,7 @@ defaulttimefilter = environ.get("DEFAULT_TIME_FILTER", "all").strip()
@app.post("/clear")
@auth_required
def clear(v):
notifs = g.db.query(Notification, Comment).join(Comment, Notification.comment_id == Comment.id).filter(Notification.read == False, Notification.user_id == v.id).all()
notifs = g.db.query(Notification).join(Comment, Notification.comment_id == Comment.id).filter(Notification.read == False, Notification.user_id == v.id).all()
for n in notifs:
n.read = True
g.db.add(n)

View File

@ -922,7 +922,9 @@ def submit_post(v, sub=None):
if isinstance(t, str): t = t.replace('s','')
embed = f'<lite-youtube videoid="{yt_id}" params="autoplay=1&modestbranding=1'
if t: embed += f'&start={int(t)}'
if t:
try: embed += f'&start={int(t)}'
except: pass
embed += '"></lite-youtube>'
elif app.config['SERVER_NAME'] in domain and "/post/" in url and "context" not in url: