forked from rDrama/rDrama
vdffsd
parent
0805b41394
commit
649f8d5323
|
@ -419,10 +419,6 @@ class Comment(Base):
|
||||||
|
|
||||||
return censor_slurs(body, v)
|
return censor_slurs(body, v)
|
||||||
|
|
||||||
def print(self):
|
|
||||||
print(f'post: {self.id}, comment: {self.author_id}', flush=True)
|
|
||||||
return ''
|
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
def collapse_for_user(self, v, path):
|
def collapse_for_user(self, v, path):
|
||||||
if v and self.author_id == v.id: return False
|
if v and self.author_id == v.id: return False
|
||||||
|
|
|
@ -444,10 +444,6 @@ class Submission(Base):
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
|
||||||
def print(self):
|
|
||||||
print(f'post: {self.id}, author: {self.author_id}', flush=True)
|
|
||||||
return ''
|
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
def realtitle(self, v):
|
def realtitle(self, v):
|
||||||
if self.club and not (v and (v.paid_dues or v.id == self.author_id)):
|
if self.club and not (v and (v.paid_dues or v.id == self.author_id)):
|
||||||
|
|
|
@ -28,7 +28,7 @@ def process_video(file):
|
||||||
else:
|
else:
|
||||||
spider = os.system(f'ffmpeg -y -loglevel warning -i {name} -map_metadata -1 -c:v copy -c:a copy {name}.mp4')
|
spider = os.system(f'ffmpeg -y -loglevel warning -i {name} -map_metadata -1 -c:v copy -c:a copy {name}.mp4')
|
||||||
|
|
||||||
if spider: print(f'ffmpeg returned {spider}')
|
if spider: print(f'ffmpeg returned {spider}', flush=True)
|
||||||
os.remove(name)
|
os.remove(name)
|
||||||
|
|
||||||
with open(f"{name}.mp4", 'rb') as f:
|
with open(f"{name}.mp4", 'rb') as f:
|
||||||
|
|
|
@ -99,7 +99,7 @@ def callback(attrs, new=False):
|
||||||
|
|
||||||
|
|
||||||
def handler(signum, frame):
|
def handler(signum, frame):
|
||||||
print("Timeout!")
|
print("Timeout!", flush=True)
|
||||||
raise Exception("Timeout")
|
raise Exception("Timeout")
|
||||||
|
|
||||||
def render_emoji(html, regexp, edit, marseys_used=set(), b=False):
|
def render_emoji(html, regexp, edit, marseys_used=set(), b=False):
|
||||||
|
|
|
@ -419,7 +419,7 @@ def monthly(v):
|
||||||
u.procoins += procoins
|
u.procoins += procoins
|
||||||
g.db.add(u)
|
g.db.add(u)
|
||||||
send_repeatable_notification(u.id, f"@{v.username} has given you {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
|
send_repeatable_notification(u.id, f"@{v.username} has given you {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
|
||||||
else: print(u.username)
|
else: print(u.username, flush=True)
|
||||||
|
|
||||||
if request.host == 'pcmemes.net':
|
if request.host == 'pcmemes.net':
|
||||||
u = g.db.query(User).filter_by(id=KIPPY_ID).one()
|
u = g.db.query(User).filter_by(id=KIPPY_ID).one()
|
||||||
|
|
|
@ -850,7 +850,7 @@ def settings_song_change(v):
|
||||||
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
|
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
|
||||||
try: ydl.download([f"https://youtube.com/watch?v={id}"])
|
try: ydl.download([f"https://youtube.com/watch?v={id}"])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e, flush=True)
|
||||||
return render_template("settings_profile.html",
|
return render_template("settings_profile.html",
|
||||||
v=v,
|
v=v,
|
||||||
error="Age-restricted videos aren't allowed.")
|
error="Age-restricted videos aren't allowed.")
|
||||||
|
|
|
@ -1218,11 +1218,11 @@ def saved_comments(v, username):
|
||||||
def fp(v, fp):
|
def fp(v, fp):
|
||||||
v.fp = fp
|
v.fp = fp
|
||||||
users = g.db.query(User).filter(User.fp == fp, User.id != v.id).all()
|
users = g.db.query(User).filter(User.fp == fp, User.id != v.id).all()
|
||||||
if users: print(f'{v.username}: fp')
|
if users: print(f'{v.username}: fp', flush=True)
|
||||||
if v.email and v.is_activated:
|
if v.email and v.is_activated:
|
||||||
alts = g.db.query(User).filter(User.email == v.email, User.is_activated, User.id != v.id).all()
|
alts = g.db.query(User).filter(User.email == v.email, User.is_activated, User.id != v.id).all()
|
||||||
if alts:
|
if alts:
|
||||||
print(f'{v.username}: email')
|
print(f'{v.username}: email', flush=True)
|
||||||
users += alts
|
users += alts
|
||||||
for u in users:
|
for u in users:
|
||||||
li = [v.id, u.id]
|
li = [v.id, u.id]
|
||||||
|
@ -1231,7 +1231,7 @@ def fp(v, fp):
|
||||||
new_alt = Alt(user1=v.id, user2=u.id)
|
new_alt = Alt(user1=v.id, user2=u.id)
|
||||||
g.db.add(new_alt)
|
g.db.add(new_alt)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
print(v.username + ' + ' + u.username)
|
print(v.username + ' + ' + u.username, flush=True)
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
return '', 204
|
return '', 204
|
|
@ -30,7 +30,7 @@ def test_signup():
|
||||||
"formkey": formkey,
|
"formkey": formkey,
|
||||||
"now": form_timestamp
|
"now": form_timestamp
|
||||||
})
|
})
|
||||||
print(f"Signing up as {username}")
|
print(f"Signing up as {username}", flush=True)
|
||||||
assert signup_post_response.status_code == 302
|
assert signup_post_response.status_code == 302
|
||||||
assert "error" not in signup_post_response.location
|
assert "error" not in signup_post_response.location
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@ was_running = docker_inspect == "running"
|
||||||
|
|
||||||
# update containers, just in case they're out of date
|
# update containers, just in case they're out of date
|
||||||
if was_running:
|
if was_running:
|
||||||
print("Updating containers . . .")
|
print("Updating containers . . .", flush=True)
|
||||||
else:
|
else:
|
||||||
print("Starting containers . . .")
|
print("Starting containers . . .", flush=True)
|
||||||
subprocess.run([
|
subprocess.run([
|
||||||
"docker-compose",
|
"docker-compose",
|
||||||
"up",
|
"up",
|
||||||
|
@ -31,7 +31,7 @@ subprocess.run([
|
||||||
)
|
)
|
||||||
|
|
||||||
# run the test
|
# run the test
|
||||||
print("Running test . . .")
|
print("Running test . . .", flush=True)
|
||||||
result = subprocess.run([
|
result = subprocess.run([
|
||||||
"docker",
|
"docker",
|
||||||
"exec",
|
"exec",
|
||||||
|
@ -41,7 +41,7 @@ result = subprocess.run([
|
||||||
|
|
||||||
if not was_running:
|
if not was_running:
|
||||||
# shut down, if we weren't running in the first place
|
# shut down, if we weren't running in the first place
|
||||||
print("Shutting down containers . . .")
|
print("Shutting down containers . . .", flush=True)
|
||||||
subprocess.run([
|
subprocess.run([
|
||||||
"docker-compose",
|
"docker-compose",
|
||||||
"stop",
|
"stop",
|
||||||
|
|
Loading…
Reference in New Issue