same as last commit

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-10-06 07:05:03 +02:00
parent 304c65d303
commit d832e195a7
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@ def process_audio(file):
def webm_to_mp4(old, new):
subprocess.run(["ffmpeg", "-y", "-loglevel", "warning", "-i", old, "-map_metadata", "-1", new, "-threads:v", "1"], check=True, stderr=subprocess.STDOUT)
tmp = f"{new}.tmp"
subprocess.run(["ffmpeg", "-y", "-loglevel", "warning", "-i", old, "-map_metadata", "-1", tmp, "-threads:v", "1"], check=True, stderr=subprocess.STDOUT)
os.rename(tmp, new)
os.remove(old)
requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS,
data=f'{{"files": ["{SITE_FULL}{new}"]}}', timeout=5)