stop rclone deleting from taking so long

master
Aevann 2024-04-07 09:05:39 +02:00
parent d0f034fbf3
commit d9321bdf9f
2 changed files with 4 additions and 1 deletions

View File

@ -325,3 +325,6 @@ if SITE == 'watchpeopledie.tv':
from rclone_python import rclone
def rclone_copy(filename):
rclone.copy(filename, 'no:/videos', ignore_existing=True, show_progress=False)
def rclone_delete(path):
params = ("rclone", "deletefile", path)
subprocess.run(params, check=True, timeout=30)

View File

@ -1895,7 +1895,7 @@ def delete_media_post(v):
if SITE == 'watchpeopledie.tv' and url.startswith(SITE_FULL_VIDEOS):
filename = url.split(SITE_FULL_VIDEOS)[1]
gevent.spawn(rclone.delete, f'no:/videos/{filename}')
gevent.spawn(rclone_delete, f'no:/videos/{filename}')
return {"message": "Media deleted successfully!"}