add streamhub
rename cache files
This commit is contained in:
doms9 2025-12-13 16:57:14 -05:00
parent 4d72d60227
commit 00000d930e
18 changed files with 230 additions and 112 deletions

View file

@ -9,9 +9,11 @@ log = get_logger(__name__)
urls: dict[str, dict[str, str | float]] = {}
CACHE_FILE = Cache("ppv.json", exp=10_800)
TAG = "PPV"
API_FILE = Cache("ppv-api.json", exp=19_800)
CACHE_FILE = Cache(f"{TAG.lower()}.json", exp=10_800)
API_FILE = Cache(f"{TAG.lower()}-api.json", exp=19_800)
API_MIRRORS = [
"https://old.ppv.to/api/streams",
@ -25,8 +27,6 @@ BASE_MIRRORS = [
"https://ppv.to",
]
TAG = "PPV"
async def refresh_api_cache(
client: httpx.AsyncClient,