fix: player connectivity and media download pipeline
- nginx: add /api/ shortcut block (no portal auth, X-Script-Name /digiserver, Host $http_host) so players can reach DigiServer API without /digiserver prefix - nginx: use $http_host in /api/ block so Flask host_url includes port — fixes media download URLs missing :8080 (was http://ip/digiserver/... not http://ip:8080/...) - player main.py: fix double-port bug when server_ip already contains a port (e.g. 192.168.0.230:8080 was producing http://192.168.0.230:8080:80) - get_playlists_v2.py: force re-sync when server version differs OR local media files are missing on disk — fixes stale playlist after server reset - digiserver api.py: playlist endpoint builds full media URLs using script_root from X-Script-Name header set by nginx - weblink support, player build/deploy improvements, manage-playlist AJAX prefix fix
This commit is contained in:
@@ -39,7 +39,11 @@ def background_player_deployment(
|
||||
player_id: int,
|
||||
port: int = 22,
|
||||
server_url: str = None,
|
||||
server_api_key: str = None
|
||||
server_api_key: str = None,
|
||||
player_hostname: str = None,
|
||||
quickconnect_code: str = None,
|
||||
orientation: str = 'Landscape',
|
||||
verify_ssl: bool = False
|
||||
) -> None:
|
||||
"""
|
||||
Deploy player code to host in background.
|
||||
@@ -53,6 +57,10 @@ def background_player_deployment(
|
||||
port: SSH port
|
||||
server_url: DigiServer URL for player
|
||||
server_api_key: API key for player
|
||||
player_hostname: Player screen identity used for auth (Player.hostname)
|
||||
quickconnect_code: Quick connect code used for auth
|
||||
orientation: Player orientation (Landscape/Portrait)
|
||||
verify_ssl: Whether the player should verify the server TLS certificate
|
||||
"""
|
||||
from app.utils.ssh_deploy import deploy_player_to_host
|
||||
from app.models import Player
|
||||
@@ -68,7 +76,11 @@ def background_player_deployment(
|
||||
player_name=player_name,
|
||||
port=port,
|
||||
server_url=server_url,
|
||||
server_api_key=server_api_key
|
||||
server_api_key=server_api_key,
|
||||
player_hostname=player_hostname,
|
||||
quickconnect_code=quickconnect_code,
|
||||
orientation=orientation,
|
||||
verify_ssl=verify_ssl
|
||||
)
|
||||
|
||||
# Update player with deployment status
|
||||
|
||||
Reference in New Issue
Block a user