propagate file deletion to US server
parent
2e12586bc0
commit
4fed812f40
|
@ -1,7 +1,9 @@
|
|||
import json
|
||||
|
||||
import requests
|
||||
|
||||
if SITE == 'watchpeopledie.tv':
|
||||
from rclone_python import rclone
|
||||
|
||||
from files.helpers.config.const import *
|
||||
|
||||
CLOUDFLARE_API_URL = "https://api.cloudflare.com/client/v4"
|
||||
|
@ -28,6 +30,13 @@ def purge_files_in_cloudflare_cache(files):
|
|||
if not CLOUDFLARE_AVAILABLE: return False
|
||||
if isinstance(files, str):
|
||||
files = [files]
|
||||
|
||||
if SITE == 'watchpeopledie.tv':
|
||||
for file in files:
|
||||
if file.startswith('https://videos.watchpeopledie.tv/'):
|
||||
filename = file.split('https://videos.watchpeopledie.tv/')[1]
|
||||
rclone.delete(f'no:/videos/{filename}')
|
||||
|
||||
post_data = {"files": files}
|
||||
res = None
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue