Compare commits
2 Commits
dbc1f51e9a
...
da1d515cc5
| Author | SHA1 | Date | |
|---|---|---|---|
| da1d515cc5 | |||
| 4d803d4fe9 |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"server_ip": "172.18.0.1",
|
"server_ip": "https://digi-signage.moto-adv.com",
|
||||||
"port": "5000",
|
"port": "443",
|
||||||
"screen_name": "rpi-tvholba1",
|
"screen_name": "tv-terasa",
|
||||||
"quickconnect_key": "8887779",
|
"quickconnect_key": "8887779",
|
||||||
"orientation": "Landscape",
|
"orientation": "Landscape",
|
||||||
"touch": "True",
|
"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
|
requests==2.32.4
|
||||||
bcrypt==4.2.1
|
bcrypt==4.2.1
|
||||||
aiohttp==3.9.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", "")
|
port = config.get("port", "")
|
||||||
|
|
||||||
# Construct server URL
|
# Construct server URL
|
||||||
|
# Remove protocol if already present
|
||||||
|
server_clean = server.replace('http://', '').replace('https://', '')
|
||||||
ip_pattern = r'^\d+\.\d+\.\d+\.\d+$'
|
ip_pattern = r'^\d+\.\d+\.\d+\.\d+$'
|
||||||
if re.match(ip_pattern, server):
|
if re.match(ip_pattern, server_clean):
|
||||||
feedback_url = f'http://{server}:{port}/api/player-feedback'
|
feedback_url = f'http://{server_clean}:{port}/api/player-feedback'
|
||||||
else:
|
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
|
# Prepare feedback data
|
||||||
feedback_data = {
|
feedback_data = {
|
||||||
'player_name': host,
|
'hostname': host,
|
||||||
'quickconnect_code': quick,
|
'quickconnect_code': quick,
|
||||||
'message': message,
|
'message': message,
|
||||||
'status': status,
|
'status': status,
|
||||||
@@ -165,11 +171,17 @@ def fetch_server_playlist(config):
|
|||||||
quick = config.get("quickconnect_key", "")
|
quick = config.get("quickconnect_key", "")
|
||||||
port = config.get("port", "")
|
port = config.get("port", "")
|
||||||
try:
|
try:
|
||||||
|
# Remove protocol if already present
|
||||||
|
server_clean = server.replace('http://', '').replace('https://', '')
|
||||||
ip_pattern = r'^\d+\.\d+\.\d+\.\d+$'
|
ip_pattern = r'^\d+\.\d+\.\d+\.\d+$'
|
||||||
if re.match(ip_pattern, server):
|
if re.match(ip_pattern, server_clean):
|
||||||
server_url = f'http://{server}:{port}/api/playlists'
|
server_url = f'http://{server_clean}:{port}/api/playlists'
|
||||||
else:
|
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 = {
|
params = {
|
||||||
'hostname': host,
|
'hostname': host,
|
||||||
'quickconnect_code': quick
|
'quickconnect_code': quick
|
||||||
|
|||||||
4
start.sh
4
start.sh
@@ -33,13 +33,13 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Check if configuration exists
|
# Check if configuration exists
|
||||||
if [ ! -f "config/app_config.txt" ]; then
|
if [ ! -f "config/app_config.json" ]; then
|
||||||
echo "=========================================="
|
echo "=========================================="
|
||||||
echo "⚠ WARNING: Configuration file not found!"
|
echo "⚠ WARNING: Configuration file not found!"
|
||||||
echo "=========================================="
|
echo "=========================================="
|
||||||
echo ""
|
echo ""
|
||||||
echo "Please configure the player before running:"
|
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 " 2. Edit the configuration file with your server details"
|
||||||
echo ""
|
echo ""
|
||||||
read -p "Press Enter to continue anyway, or Ctrl+C to exit..."
|
read -p "Press Enter to continue anyway, or Ctrl+C to exit..."
|
||||||
|
|||||||
Reference in New Issue
Block a user