updated player for deploy from server
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
1768682062.8464386
|
1782752385.7015185
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"server_ip": "192.168.0.121",
|
"server_ip": "192.168.0.159",
|
||||||
"port": "443",
|
"port": "8080",
|
||||||
"screen_name": "rpi-tvcanba1",
|
"screen_name": "rpi-Receptie",
|
||||||
"quickconnect_key": "8887779",
|
"quickconnect_key": "8887779",
|
||||||
"orientation": "Landscape",
|
"orientation": "Landscape",
|
||||||
"touch": "True",
|
"touch": "True",
|
||||||
"max_resolution": "1920x1080",
|
"max_resolution": "1920x1080",
|
||||||
"edit_feature_enabled": true,
|
"edit_feature_enabled": true,
|
||||||
"use_https": true,
|
"use_https": false,
|
||||||
"verify_ssl": false
|
"verify_ssl": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"hostname": "rpi-tvcanba1",
|
|
||||||
"auth_code": "LhfERILw4cFxejhbIUuQ72QddisRgHMAm7kUSty64LA",
|
|
||||||
"player_id": 1,
|
|
||||||
"player_name": "TVacasa",
|
|
||||||
"playlist_id": 1,
|
|
||||||
"orientation": "Landscape",
|
|
||||||
"authenticated": true,
|
|
||||||
"server_url": "https://192.168.0.121:443"
|
|
||||||
}
|
|
||||||
@@ -1,27 +1,23 @@
|
|||||||
{
|
{
|
||||||
"count": 3,
|
"count": 2,
|
||||||
"player_id": 1,
|
"player_id": 1,
|
||||||
"player_name": "TVacasa",
|
"player_name": "Receptie TV",
|
||||||
"playlist": [
|
"playlist": [
|
||||||
{
|
{
|
||||||
"file_name": "2026efvev-1428673176.jpg",
|
"file_name": "sean-oulashin-KMn4VEeEPR8-unsplash.jpg",
|
||||||
"url": "media/2026efvev-1428673176.jpg",
|
"type": "image",
|
||||||
"duration": 50,
|
"url": "media/sean-oulashin-KMn4VEeEPR8-unsplash.jpg",
|
||||||
"edit_on_player": true
|
"duration": 25,
|
||||||
|
"edit_on_player": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file_name": "4k1.jpg",
|
"file_name": "robert-lukeman-zNN6ubHmruI-unsplash.jpg",
|
||||||
"url": "media/4k1.jpg",
|
"type": "image",
|
||||||
"duration": 30,
|
"url": "media/robert-lukeman-zNN6ubHmruI-unsplash.jpg",
|
||||||
"edit_on_player": true
|
"duration": 20,
|
||||||
},
|
|
||||||
{
|
|
||||||
"file_name": "1416529-hd_1920_1080_30fps.mp4",
|
|
||||||
"url": "media/1416529-hd_1920_1080_30fps.mp4",
|
|
||||||
"duration": 13,
|
|
||||||
"edit_on_player": false
|
"edit_on_player": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"playlist_id": 1,
|
"playlist_id": 1,
|
||||||
"playlist_version": 34
|
"playlist_version": 15
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ def ensure_authenticated(config):
|
|||||||
# Use HTTPS for IP addresses
|
# Use HTTPS for IP addresses
|
||||||
server_url = f'https://{server_ip}:{port}' if port else f'https://{server_ip}'
|
server_url = f'https://{server_ip}:{port}' if port else f'https://{server_ip}'
|
||||||
else:
|
else:
|
||||||
server_url = f'http://{server_ip}:{port}'
|
server_url = f'http://{server_ip}:{port}' if port else f'http://{server_ip}'
|
||||||
else:
|
else:
|
||||||
# For domain names, use HTTPS by default
|
# For domain names, use HTTPS by default
|
||||||
if use_https:
|
if use_https:
|
||||||
|
|||||||
+8
-2
@@ -640,6 +640,7 @@ class SettingsPopup(Popup):
|
|||||||
|
|
||||||
# Populate current values
|
# Populate current values
|
||||||
self.ids.server_input.text = self.player.config.get('server_ip', 'localhost')
|
self.ids.server_input.text = self.player.config.get('server_ip', 'localhost')
|
||||||
|
self.ids.port_input.text = str(self.player.config.get('port', ''))
|
||||||
self.ids.screen_input.text = self.player.config.get('screen_name', 'kivy-player')
|
self.ids.screen_input.text = self.player.config.get('screen_name', 'kivy-player')
|
||||||
self.ids.quickconnect_input.text = self.player.config.get('quickconnect_key', '1234567')
|
self.ids.quickconnect_input.text = self.player.config.get('quickconnect_key', '1234567')
|
||||||
self.ids.orientation_input.text = self.player.config.get('orientation', 'Landscape')
|
self.ids.orientation_input.text = self.player.config.get('orientation', 'Landscape')
|
||||||
@@ -723,7 +724,7 @@ class SettingsPopup(Popup):
|
|||||||
server_ip = self.ids.server_input.text.strip()
|
server_ip = self.ids.server_input.text.strip()
|
||||||
screen_name = self.ids.screen_input.text.strip()
|
screen_name = self.ids.screen_input.text.strip()
|
||||||
quickconnect = self.ids.quickconnect_input.text.strip()
|
quickconnect = self.ids.quickconnect_input.text.strip()
|
||||||
port = self.player.config.get('port', '443')
|
port = self.ids.port_input.text.strip() or self.player.config.get('port', '')
|
||||||
use_https = self.player.config.get('use_https', True)
|
use_https = self.player.config.get('use_https', True)
|
||||||
verify_ssl = self.player.config.get('verify_ssl', True)
|
verify_ssl = self.player.config.get('verify_ssl', True)
|
||||||
|
|
||||||
@@ -741,7 +742,11 @@ class SettingsPopup(Popup):
|
|||||||
server_url = f"{server_ip}:{port}"
|
server_url = f"{server_ip}:{port}"
|
||||||
else:
|
else:
|
||||||
protocol = "https" if use_https else "http"
|
protocol = "https" if use_https else "http"
|
||||||
server_url = f"{protocol}://{server_ip}:{port}"
|
if ':' in server_ip:
|
||||||
|
# server_ip already contains a port (e.g. 192.168.0.230:8080)
|
||||||
|
server_url = f"{protocol}://{server_ip}"
|
||||||
|
else:
|
||||||
|
server_url = f"{protocol}://{server_ip}:{port}" if port else f"{protocol}://{server_ip}"
|
||||||
|
|
||||||
Logger.info(f"SettingsPopup: Testing connection to {server_url} (HTTPS: {use_https}, Verify SSL: {verify_ssl})")
|
Logger.info(f"SettingsPopup: Testing connection to {server_url} (HTTPS: {use_https}, Verify SSL: {verify_ssl})")
|
||||||
|
|
||||||
@@ -875,6 +880,7 @@ class SettingsPopup(Popup):
|
|||||||
"""Save configuration and close popup"""
|
"""Save configuration and close popup"""
|
||||||
# Update config
|
# Update config
|
||||||
self.player.config['server_ip'] = self.ids.server_input.text
|
self.player.config['server_ip'] = self.ids.server_input.text
|
||||||
|
self.player.config['port'] = self.ids.port_input.text.strip()
|
||||||
self.player.config['screen_name'] = self.ids.screen_input.text
|
self.player.config['screen_name'] = self.ids.screen_input.text
|
||||||
self.player.config['quickconnect_key'] = self.ids.quickconnect_input.text
|
self.player.config['quickconnect_key'] = self.ids.quickconnect_input.text
|
||||||
self.player.config['orientation'] = self.ids.orientation_input.text
|
self.player.config['orientation'] = self.ids.orientation_input.text
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"hostname": "rpi-tvcanba1",
|
"hostname": "rpi-Receptie",
|
||||||
"auth_code": "LhfERILw4cFxejhbIUuQ72QddisRgHMAm7kUSty64LA",
|
"auth_code": "BrJrGzX_IT9oP_Lfke8Qgo4sDjMc49T1EhSnWmKKpDM",
|
||||||
"player_id": 1,
|
"player_id": 1,
|
||||||
"player_name": "TVacasa",
|
"player_name": "Receptie TV",
|
||||||
"playlist_id": 1,
|
"playlist_id": 1,
|
||||||
"orientation": "Landscape",
|
"orientation": "Landscape",
|
||||||
"authenticated": true,
|
"authenticated": true,
|
||||||
"server_url": "https://192.168.0.121:443"
|
"server_url": "http://192.168.0.159:8080"
|
||||||
}
|
}
|
||||||
@@ -382,6 +382,30 @@
|
|||||||
write_tab: False
|
write_tab: False
|
||||||
on_touch_down: root.on_input_touch(self, args[1]) if self.collide_point(*args[1].pos) else None
|
on_touch_down: root.on_input_touch(self, args[1]) if self.collide_point(*args[1].pos) else None
|
||||||
|
|
||||||
|
# Server port
|
||||||
|
BoxLayout:
|
||||||
|
orientation: 'horizontal'
|
||||||
|
size_hint_y: None
|
||||||
|
height: dp(40)
|
||||||
|
spacing: dp(10)
|
||||||
|
|
||||||
|
Label:
|
||||||
|
text: 'Port:'
|
||||||
|
size_hint_x: 0.3
|
||||||
|
text_size: self.size
|
||||||
|
halign: 'left'
|
||||||
|
valign: 'middle'
|
||||||
|
|
||||||
|
TextInput:
|
||||||
|
id: port_input
|
||||||
|
size_hint_x: 0.7
|
||||||
|
multiline: False
|
||||||
|
font_size: sp(14)
|
||||||
|
hint_text: '80 or 8080 (leave empty for default)'
|
||||||
|
input_filter: 'int'
|
||||||
|
write_tab: False
|
||||||
|
on_touch_down: root.on_input_touch(self, args[1]) if self.collide_point(*args[1].pos) else None
|
||||||
|
|
||||||
# Screen name
|
# Screen name
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'horizontal'
|
orientation: 'horizontal'
|
||||||
|
|||||||
Reference in New Issue
Block a user