forked from rDrama/rDrama
fix /refresh_chat once and for all
parent
89df128827
commit
fb0b92364a
|
@ -185,7 +185,7 @@ def _create_and_delete_orgy():
|
||||||
del g.db
|
del g.db
|
||||||
stdout.flush()
|
stdout.flush()
|
||||||
|
|
||||||
requests.post('http://localhost:5001/refresh_chat')
|
requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
|
||||||
|
|
||||||
video_info = ffmpeg.probe(f'/orgies/{get_file()}')
|
video_info = ffmpeg.probe(f'/orgies/{get_file()}')
|
||||||
seconds = int(video_info['streams'][0]['duration'])
|
seconds = int(video_info['streams'][0]['duration'])
|
||||||
|
@ -195,7 +195,7 @@ def _create_and_delete_orgy():
|
||||||
if orgy:
|
if orgy:
|
||||||
g.db.delete(orgy)
|
g.db.delete(orgy)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
requests.post('http://localhost:5001/refresh_chat')
|
requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
|
||||||
|
|
||||||
def _delete_all_posts():
|
def _delete_all_posts():
|
||||||
posts = g.db.query(Post).filter_by(author_id=AUTOJANNY_ID, deleted_utc=0).all()
|
posts = g.db.query(Post).filter_by(author_id=AUTOJANNY_ID, deleted_utc=0).all()
|
||||||
|
|
|
@ -1979,8 +1979,7 @@ def start_orgy(v):
|
||||||
g.db.add(orgy)
|
g.db.add(orgy)
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
x = requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
|
requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
|
||||||
print(x.text, flush=True)
|
|
||||||
|
|
||||||
return redirect('/chat')
|
return redirect('/chat')
|
||||||
|
|
||||||
|
@ -1988,5 +1987,5 @@ def start_orgy(v):
|
||||||
@admin_level_required(PERMS['ORGIES'])
|
@admin_level_required(PERMS['ORGIES'])
|
||||||
def stop_orgy(v):
|
def stop_orgy(v):
|
||||||
g.db.query(Orgy).delete()
|
g.db.query(Orgy).delete()
|
||||||
requests.post('http://localhost:5001/refresh_chat')
|
requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
|
||||||
return {"message": "Orgy stopped successfully!"}
|
return {"message": "Orgy stopped successfully!"}
|
||||||
|
|
Loading…
Reference in New Issue