Compare commits

...

2 Commits

Author SHA1 Message Date
da1d515cc5 updated 2025-11-21 22:20:23 +02:00
4d803d4fe9 updated files 2025-11-21 22:20:06 +02:00
14 changed files with 25 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
{
"server_ip": "172.18.0.1",
"port": "5000",
"screen_name": "rpi-tvholba1",
"server_ip": "https://digi-signage.moto-adv.com",
"port": "443",
"screen_name": "tv-terasa",
"quickconnect_key": "8887779",
"orientation": "Landscape",
"touch": "True",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
kivy==2.1.0
kivy>=2.3.0
requests==2.32.4
bcrypt==4.2.1
aiohttp==3.9.1

View File

@@ -31,15 +31,21 @@ def send_player_feedback(config, message, status="active", playlist_version=None
port = config.get("port", "")
# Construct server URL
# Remove protocol if already present
server_clean = server.replace('http://', '').replace('https://', '')
ip_pattern = r'^\d+\.\d+\.\d+\.\d+$'
if re.match(ip_pattern, server):
feedback_url = f'http://{server}:{port}/api/player-feedback'
if re.match(ip_pattern, server_clean):
feedback_url = f'http://{server_clean}:{port}/api/player-feedback'
else:
feedback_url = f'http://{server}/api/player-feedback'
# Use original server if it has protocol, otherwise add http://
if server.startswith(('http://', 'https://')):
feedback_url = f'{server}/api/player-feedback'
else:
feedback_url = f'http://{server}/api/player-feedback'
# Prepare feedback data
feedback_data = {
'player_name': host,
'hostname': host,
'quickconnect_code': quick,
'message': message,
'status': status,
@@ -165,11 +171,17 @@ def fetch_server_playlist(config):
quick = config.get("quickconnect_key", "")
port = config.get("port", "")
try:
# Remove protocol if already present
server_clean = server.replace('http://', '').replace('https://', '')
ip_pattern = r'^\d+\.\d+\.\d+\.\d+$'
if re.match(ip_pattern, server):
server_url = f'http://{server}:{port}/api/playlists'
if re.match(ip_pattern, server_clean):
server_url = f'http://{server_clean}:{port}/api/playlists'
else:
server_url = f'http://{server}/api/playlists'
# Use original server if it has protocol, otherwise add http://
if server.startswith(('http://', 'https://')):
server_url = f'{server}/api/playlists'
else:
server_url = f'http://{server}/api/playlists'
params = {
'hostname': host,
'quickconnect_code': quick

View File

@@ -33,13 +33,13 @@ fi
echo ""
# Check if configuration exists
if [ ! -f "config/app_config.txt" ]; then
if [ ! -f "config/app_config.json" ]; then
echo "=========================================="
echo "⚠ WARNING: Configuration file not found!"
echo "=========================================="
echo ""
echo "Please configure the player before running:"
echo " 1. Copy config/app_config.txt.example to config/app_config.txt"
echo " 1. Copy config/app_config.json.example to config/app_config.json"
echo " 2. Edit the configuration file with your server details"
echo ""
read -p "Press Enter to continue anyway, or Ctrl+C to exit..."