Compare commits
2 Commits
dbc1f51e9a
...
da1d515cc5
| Author | SHA1 | Date | |
|---|---|---|---|
| da1d515cc5 | |||
| 4d803d4fe9 |
@@ -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.
BIN
repo/python-wheels/certifi-2025.11.12-py3-none-any.whl
Normal file
BIN
repo/python-wheels/certifi-2025.11.12-py3-none-any.whl
Normal file
Binary file not shown.
Binary file not shown.
BIN
repo/python-wheels/docutils-0.22.3-py3-none-any.whl
Normal file
BIN
repo/python-wheels/docutils-0.22.3-py3-none-any.whl
Normal file
Binary file not shown.
BIN
repo/python-wheels/filetype-1.2.0-py2.py3-none-any.whl
Normal file
BIN
repo/python-wheels/filetype-1.2.0-py2.py3-none-any.whl
Normal file
Binary file not shown.
BIN
repo/python-wheels/requests-2.32.5-py3-none-any.whl
Normal file
BIN
repo/python-wheels/requests-2.32.5-py3-none-any.whl
Normal file
Binary file not shown.
BIN
repo/python-wheels/setuptools-80.9.0-py3-none-any.whl
Normal file
BIN
repo/python-wheels/setuptools-80.9.0-py3-none-any.whl
Normal file
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
kivy==2.1.0
|
||||
kivy>=2.3.0
|
||||
requests==2.32.4
|
||||
bcrypt==4.2.1
|
||||
aiohttp==3.9.1
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
4
start.sh
4
start.sh
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user