autotako

Service to monitor moombox for completed livestream downloads to upload for distribution
git clone https://code.alwayswait.ing/autotako
Log | Files | Refs | README

commit e7bae78efb8b12ca0e9c503d9c54929458ef6867
parent 587238e7c535e734c93d539edf4c3bceee11e567
Author: archiveanon <>
Date:   Sun, 25 Jan 2026 16:18:55 +0000

Use proper URL joining

Diffstat:
Msrc/autotako/job_render.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/autotako/job_render.py b/src/autotako/job_render.py @@ -8,6 +8,7 @@ import json import logging import pathlib import re +import urllib.parse from typing import Self import gofile.api # type: ignore @@ -193,7 +194,7 @@ async def get_moombox_job_by_id(jobid: str) -> MoomboxJobInfo | None: on=httpx.HTTPError, attempts=None, timeout=None, wait_initial=0.5, wait_max=10.0 ): with attempt: - result = await client.get(f"{config.moombox_url}/status") + result = await client.get(urllib.parse.urljoin(config.moombox_url, "status")) for job in result.json(): if job["id"] == jobid: return msgspec.convert(job, type=MoomboxJobInfo) @@ -291,7 +292,7 @@ async def do_webdav_upload(webdav: WebDavConfig, filepath: pathlib.Path, target: connection_warning_seen = False while True: try: - dest = f"{webdav.base_url}/{target}" + dest = urllib.parse.urljoin(webdav.base_url, target) file_check = await client.head(dest) if file_check.status_code == httpx.codes.NOT_FOUND: with filepath.open("rb") as fh: @@ -526,7 +527,9 @@ async def job_auto_monitor(): wait_max=10.0, ): with attempt: - result = await client.get(f"{config.moombox_url}/status") + result = await client.get( + urllib.parse.urljoin(config.moombox_url, "status") + ) result.raise_for_status() result.json()