Files
facefusion/facefusion/curl_builder.py
T
Henry Ruhs 5b7d145aa7 Patch 3.6.1 (#1078)
* Avast intercepts ssl cert and breaks curl

* modernize dependencies

* fix sanitizer for int range

* comment out tests

* disable testing for CI

* disable testing for CI
2026-04-19 21:17:39 +02:00

33 lines
859 B
Python

import itertools
import shutil
from typing import List
from facefusion import metadata
from facefusion.types import Command
def run(commands : List[Command]) -> List[Command]:
user_agent = metadata.get('name') + '/' + metadata.get('version')
return [ shutil.which('curl'), '--user-agent', user_agent, '--location', '--silent', '--ssl-no-revoke' ] + commands
def chain(*commands : List[Command]) -> List[Command]:
return list(itertools.chain(*commands))
def ping(url : str) -> List[Command]:
return [ '-I', url ]
def download(url : str, download_file_path : str) -> List[Command]:
return [ '--create-dirs', '--continue-at', '-', '--output', download_file_path, url ]
def set_timeout(timeout : int) -> List[Command]:
return [ '--connect-timeout', str(timeout) ]
def set_retry(retry : int) -> List[Command]:
return [ '--retry', str(retry) ]