From 3a360e0c79c96926864797ab6a6dd4cb3ccf817c Mon Sep 17 00:00:00 2001 From: Alexey Barabanov Date: Thu, 20 Nov 2025 13:29:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B4=D0=B5=D0=BB=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=20FQDN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- get_data.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/get_data.py b/get_data.py index a538fe4..f82c3c3 100644 --- a/get_data.py +++ b/get_data.py @@ -31,25 +31,12 @@ MYHOST = platform.node() if not os.path.exists("logs"): os.makedirs("logs") + def get_fqdn(): system_name = platform.system() if system_name == "Linux": - hostname = platform.node() - fqdn = f"https://{hostname}.tvstart.ru" - else: - fqdn = "http://127.0.0.1" - - return fqdn - -FQDN = get_fqdn - - -def get_fqdn(): - system_name = platform.system() - - if system_name == "Linux": - hostname = platform.node() + hostname = platform.node().lower() fqdn = f"https://{hostname}.tvstart.ru" else: fqdn = "http://127.0.0.1" @@ -3230,7 +3217,7 @@ async def vmix_project(): # pass # else: # ❗ На Linux/Synology/Docker — заменяем URL - edited_vmix = change_vmix_datasource_urls(vmix_bio, f"https://{MYHOST}.tvstart.ru") + edited_vmix = change_vmix_datasource_urls(vmix_bio, FQDN) # 2. гарантируем, что это bytes if isinstance(edited_vmix, str): edited_vmix = edited_vmix.encode("utf-8") @@ -3512,8 +3499,7 @@ def get_image(points, bib, count_point): SHOTMAP_CACHE[filename] = data # кладём в RAM # формируем URL для vMix - public_base = f"https://{MYHOST}.tvstart.ru" - public_url = f"{public_base.rstrip('/')}/image/{filename}" + public_url = f"{FQDN}/image/{filename}" # logger.info( # f"[shotmap] generated in-memory shotmap for bib={bib}, ver={count_point} "