fix: Extra-Routes Import + Dashboard Lesbarkeit (NICHT LOESCHEN)
ACHTUNG: Der Import-Block vor if __name__ MUSS bleiben! Ohne ihn funktionieren /downloads, /status, /health nicht.
This commit is contained in:
parent
99d7ab7387
commit
fc02d37afe
1 changed files with 8 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ from datetime import datetime
|
|||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
sys.path.insert(0, '/opt')
|
||||
|
||||
from flask import Flask, jsonify, render_template_string, request
|
||||
from tools import savetv
|
||||
|
|
@ -586,5 +587,12 @@ def api_download():
|
|||
return jsonify({"results": results})
|
||||
|
||||
|
||||
# Extra-Routes (Downloads, Status, Health) - lokal in /opt/savetv_extra_routes.py
|
||||
try:
|
||||
from savetv_extra_routes import register_extra_routes
|
||||
register_extra_routes(app)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port=8765, debug=False)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue