remove Media query i dont remember the purpose of

master
Aevann 2023-03-17 12:50:49 +02:00
parent 32910c5cf5
commit 023b398759
1 changed files with 0 additions and 11 deletions

View File

@ -94,8 +94,6 @@ def process_audio(file, v):
abort(400)
os.remove(old)
media = g.db.query(Media).filter_by(filename=new, kind='audio').one_or_none()
if media: g.db.delete(media)
media = Media(
kind='audio',
@ -121,9 +119,6 @@ def convert_to_mp4(old, new, vid, db):
os.replace(tmp, new)
os.remove(old)
media = db.query(Media).filter_by(filename=new, kind='video').one_or_none()
if media: db.delete(media)
media = Media(
kind='video',
filename=new,
@ -169,9 +164,6 @@ def process_video(file, v):
os.remove(old)
media = g.db.query(Media).filter_by(filename=new, kind='video').one_or_none()
if media: g.db.delete(media)
media = Media(
kind='video',
filename=new,
@ -269,9 +261,6 @@ def process_image(filename:str, v, resize=0, trim=False, uploader_id:Optional[in
db = db or g.db
media = db.query(Media).filter_by(filename=filename, kind='image').one_or_none()
if media: db.delete(media)
media = Media(
kind='image',
filename=filename,