Save.TV auf pve-hetzner deaktiviert
SAVETV_ENABLED=false stoppt Web-UI, Filmtipp-Job und Bot-Tools. Aufnahmen (~10 GB) auf /var/lib/vz/savetv/ gelöscht.
This commit is contained in:
parent
f6a606cce5
commit
7d5fa953a4
3 changed files with 32 additions and 8 deletions
|
|
@ -1158,13 +1158,19 @@ def main():
|
||||||
app.add_handler(MessageHandler(filters.Document.ALL, handle_document))
|
app.add_handler(MessageHandler(filters.Document.ALL, handle_document))
|
||||||
app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_message))
|
app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_message))
|
||||||
|
|
||||||
|
_cfg = config.parse_config()
|
||||||
|
savetv_enabled = _cfg.raw.get("SAVETV_ENABLED", "true").lower() not in ("false", "0", "no")
|
||||||
|
|
||||||
if app.job_queue is not None:
|
if app.job_queue is not None:
|
||||||
|
if savetv_enabled:
|
||||||
app.job_queue.run_daily(
|
app.job_queue.run_daily(
|
||||||
_send_daily_filmtipps,
|
_send_daily_filmtipps,
|
||||||
time=dtime(hour=14, minute=0),
|
time=dtime(hour=14, minute=0),
|
||||||
name="daily_filmtipps",
|
name="daily_filmtipps",
|
||||||
)
|
)
|
||||||
log.info("Täglicher Filmtipp-Job registriert (14:00 Uhr)")
|
log.info("Täglicher Filmtipp-Job registriert (14:00 Uhr)")
|
||||||
|
else:
|
||||||
|
log.info("Save.TV deaktiviert — Filmtipp-Job übersprungen")
|
||||||
app.job_queue.run_daily(
|
app.job_queue.run_daily(
|
||||||
_send_daily_forecast,
|
_send_daily_forecast,
|
||||||
time=dtime(hour=8, minute=0),
|
time=dtime(hour=8, minute=0),
|
||||||
|
|
@ -1172,7 +1178,10 @@ def main():
|
||||||
)
|
)
|
||||||
log.info("Täglicher Forecast-Job registriert (08:00 Uhr)")
|
log.info("Täglicher Forecast-Job registriert (08:00 Uhr)")
|
||||||
else:
|
else:
|
||||||
|
if savetv_enabled:
|
||||||
log.warning("JobQueue nicht verfügbar — Filmtipps werden per asyncio-Loop gesendet")
|
log.warning("JobQueue nicht verfügbar — Filmtipps werden per asyncio-Loop gesendet")
|
||||||
|
else:
|
||||||
|
log.info("Save.TV deaktiviert — kein Filmtipp-Fallback-Loop")
|
||||||
|
|
||||||
async def _filmtipp_loop(application):
|
async def _filmtipp_loop(application):
|
||||||
"""Fallback: asyncio-basierter täglicher Filmtipp (wenn kein JobQueue)."""
|
"""Fallback: asyncio-basierter täglicher Filmtipp (wenn kein JobQueue)."""
|
||||||
|
|
@ -1224,6 +1233,7 @@ def main():
|
||||||
_BACKGROUND_TASKS.append(asyncio.create_task(_monitor_loop(application)))
|
_BACKGROUND_TASKS.append(asyncio.create_task(_monitor_loop(application)))
|
||||||
log.info("Monitor-Loop aktiv (alle 10 Min)")
|
log.info("Monitor-Loop aktiv (alle 10 Min)")
|
||||||
if application.job_queue is None:
|
if application.job_queue is None:
|
||||||
|
if savetv_enabled:
|
||||||
_BACKGROUND_TASKS.append(asyncio.create_task(_filmtipp_loop(application)))
|
_BACKGROUND_TASKS.append(asyncio.create_task(_filmtipp_loop(application)))
|
||||||
_BACKGROUND_TASKS.append(asyncio.create_task(_forecast_loop(application)))
|
_BACKGROUND_TASKS.append(asyncio.create_task(_forecast_loop(application)))
|
||||||
_sd_notify("READY=1")
|
_sd_notify("READY=1")
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,15 @@ import logging
|
||||||
|
|
||||||
log = logging.getLogger("tool_loader")
|
log = logging.getLogger("tool_loader")
|
||||||
|
|
||||||
|
|
||||||
|
def _savetv_enabled() -> bool:
|
||||||
|
try:
|
||||||
|
from core.config import parse_config
|
||||||
|
cfg = parse_config()
|
||||||
|
return cfg.raw.get("SAVETV_ENABLED", "true").lower() not in ("false", "0", "no")
|
||||||
|
except Exception:
|
||||||
|
return True
|
||||||
|
|
||||||
_cache = {"tools": None, "prompt": None, "modules": None}
|
_cache = {"tools": None, "prompt": None, "modules": None}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -27,6 +36,9 @@ def _discover_modules():
|
||||||
name = os.path.basename(path)[:-3]
|
name = os.path.basename(path)[:-3]
|
||||||
if name.startswith("_"):
|
if name.startswith("_"):
|
||||||
continue
|
continue
|
||||||
|
if name == "savetv" and not _savetv_enabled():
|
||||||
|
log.info("Save.TV deaktiviert (SAVETV_ENABLED=false)")
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
mod = importlib.import_module(f"tools.{name}")
|
mod = importlib.import_module(f"tools.{name}")
|
||||||
modules.append(mod)
|
modules.append(mod)
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,8 @@ MCP_TOOLS="homelab_overview,homelab_all_containers,homelab_container_status,home
|
||||||
SAVETV_USER="739281"
|
SAVETV_USER="739281"
|
||||||
SAVETV_PASS="Astral1966"
|
SAVETV_PASS="Astral1966"
|
||||||
SAVETV_URL="https://www.save.tv"
|
SAVETV_URL="https://www.save.tv"
|
||||||
|
# Deaktiviert 2026-07-26: Pipeline gestoppt, Aufnahmen geloescht
|
||||||
|
SAVETV_ENABLED="false"
|
||||||
# Download-Pipeline: AKTIV (Save.TV → Hetzner CT116 → Jellyfin-Server → NAS Muldenstein)
|
# Download-Pipeline: AKTIV (Save.TV → Hetzner CT116 → Jellyfin-Server → NAS Muldenstein)
|
||||||
# savetv_sync.py läuft stündlich auf Jellyfin-Server (100.77.105.3), 24h±30min Delay, min. 700MB
|
# savetv_sync.py läuft stündlich auf Jellyfin-Server (100.77.105.3), 24h±30min Delay, min. 700MB
|
||||||
# CT 116 /etc/hosts: www.save.tv → 172.66.146.119 (DNS-GIL-Fix)
|
# CT 116 /etc/hosts: www.save.tv → 172.66.146.119 (DNS-GIL-Fix)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue