moved files

This commit is contained in:
Kiwy Signage Player
2025-12-06 00:12:37 +02:00
parent 89e5ad86dd
commit 9664ad541b
9 changed files with 364 additions and 17 deletions
+15
View File
@@ -544,6 +544,21 @@ class EditPopup(Popup):
if response.status_code == 200:
response_data = response.json()
Logger.info(f"EditPopup: ✅ Successfully uploaded edited media to server: {response_data}")
# Delete local files after successful upload
try:
if os.path.exists(image_path):
os.remove(image_path)
Logger.info(f"EditPopup: Deleted local image file: {os.path.basename(image_path)}")
if os.path.exists(metadata_path):
os.remove(metadata_path)
Logger.info(f"EditPopup: Deleted local metadata file: {os.path.basename(metadata_path)}")
Logger.info("EditPopup: ✅ Local edited files cleaned up after successful upload")
except Exception as e:
Logger.warning(f"EditPopup: Could not delete local files: {e}")
return True
elif response.status_code == 404:
Logger.warning("EditPopup: ⚠️ Upload endpoint not available on server (404) - edited media saved locally only")
+3 -3
View File
@@ -1,10 +1,10 @@
{
"hostname": "tv-terasa",
"auth_code": "iiSyZDLWGyqNIxeRt54XYREgvAio11RwwU1_oJev6WI",
"auth_code": "vkrxEO6eOTxkzXJBtoN4OuXc8eaX2mC3AB9ZePrnick",
"player_id": 1,
"player_name": "TV-acasa 1",
"player_name": "TV-acasa",
"playlist_id": 1,
"orientation": "Landscape",
"authenticated": true,
"server_url": "https://digi-signage.moto-adv.com:443"
"server_url": "http://digi-signage.moto-adv.com"
}