updated to tkinter

This commit is contained in:
2025-08-05 16:51:15 +03:00
parent 93c0637bca
commit 8293111e09
47 changed files with 2118 additions and 1077 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
venv/

View File

@@ -1,134 +0,0 @@
#!/bin/bash
# Define variables
REPO_URL="https://gitea.moto-adv.com/ske087/signage-player.git"
DEFAULT_INSTALL_DIR="/home/pi/signage-player"
SERVICE_FILE="/etc/systemd/system/signage_player.service"
RUN_APP_FILE="$DEFAULT_INSTALL_DIR/run_app.sh"
# Ask the user whether to use the default installation directory
echo "The default installation directory is: $DEFAULT_INSTALL_DIR"
read -p "Do you want to use the default installation directory? (y/n): " response
# Handle the user's response
if [[ "$response" == "y" || "$response" == "Y" ]]; then
INSTALL_DIR="$DEFAULT_INSTALL_DIR"
echo "Using default installation directory: $INSTALL_DIR"
else
read -p "Enter the custom installation directory: " CUSTOM_INSTALL_DIR
INSTALL_DIR="$CUSTOM_INSTALL_DIR"
if [[ ! -d "$INSTALL_DIR" ]]; then
echo "Directory $INSTALL_DIR does not exist. Creating it..."
mkdir -p "$INSTALL_DIR"
if [[ $? -ne 0 ]]; then
echo "Error: Failed to create directory $INSTALL_DIR."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
fi
fi
echo "Using custom installation directory: $INSTALL_DIR"
fi
# Update system packages
echo "Updating system packages..."
sudo apt update && sudo apt upgrade -y || {
echo "Error: Failed to update system packages."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
echo "Installation directory is set to: $INSTALL_DIR and is starting the installation process."
# Install required system packages
echo "Installing required system packages..."
sudo apt install -y python3 python3-pip git || {
echo "Error: Failed to install required system packages."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
# Clone the repository
echo "Cloning the repository..."
if [ -d "$INSTALL_DIR" ]; then
echo "Directory $INSTALL_DIR already exists. Removing it..."
sudo rm -rf "$INSTALL_DIR"
fi
git clone "$REPO_URL" "$INSTALL_DIR" || {
echo "Error: Failed to clone the repository."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
# Navigate to the cloned repository
cd "$INSTALL_DIR" || {
echo "Error: Failed to navigate to the cloned repository."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
# Install Python dependencies
echo "Installing Python dependencies..."
pip3 install -r requirements.txt --break-system-packages || {
echo "Error: Failed to install Python dependencies."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
# Set permissions for the run_app.sh script
echo "Setting permissions for run_app.sh..."
chmod +x "$INSTALL_DIR/run_app.sh" || {
echo "Error: Failed to set permissions for run_app.sh."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
# Create the signage_player.service file in the installation folder
SERVICE_TEMPLATE="$INSTALL_DIR/signage_player.service"
echo "Creating signage_player.service file in the installation folder..."
cat <<EOF > "$SERVICE_TEMPLATE"
[Unit]
Description=Signage Player Service
After=network.target
[Service]
Type=simple
WorkingDirectory=$INSTALL_DIR
ExecStart=$INSTALL_DIR/run_app.sh
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
# Copy the service file to the systemd service directory
echo "Copying signage_player.service file to $SERVICE_FILE..."
sudo cp "$SERVICE_TEMPLATE" "$SERVICE_FILE" || {
echo "Error: Failed to copy signage_player.service file."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
# Reload systemd daemon
echo "Reloading systemd daemon..."
sudo systemctl daemon-reload || {
echo "Error: Failed to reload systemd daemon."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
# Enable the service
echo "Enabling signage_player.service..."
sudo systemctl enable signage_player.service || {
echo "Error: Failed to enable signage_player.service."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}
echo "signage_player.service file created, copied, and enabled successfully."
# Restart the system to check if the service starts
echo "Restarting the system to check if the service starts..."
sudo reboot || {
echo "Error: Failed to restart the system."
read -p "Press any key to close the terminal..." -n 1 -s
exit 1
}

68
install_tkinter.sh Executable file
View File

@@ -0,0 +1,68 @@
#!/bin/bash
# Tkinter Media Player Installation Script
echo "Installing Tkinter Media Player..."
# Update system packages
echo "Updating system packages..."
sudo apt update
sudo apt upgrade -y
# Install system dependencies
echo "Installing system dependencies..."
sudo apt install -y python3 python3-pip python3-venv python3-tk
sudo apt install -y ffmpeg libopencv-dev python3-opencv
sudo apt install -y libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev
sudo apt install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev
# Create project directory if it doesn't exist
PROJECT_DIR="/home/pi/Desktop/signage-player"
if [ ! -d "$PROJECT_DIR" ]; then
echo "Project directory not found. Please ensure the signage-player directory exists."
exit 1
fi
cd "$PROJECT_DIR"
# Create virtual environment
echo "Creating Python virtual environment..."
python3 -m venv venv
# Activate virtual environment and install requirements
echo "Installing Python dependencies..."
source venv/bin/activate
pip install --upgrade pip
pip install -r tkinter_requirements.txt
deactivate
# Make launcher script executable
chmod +x run_tkinter_app.sh
# Create systemd service for auto-start
echo "Creating systemd service..."
sudo tee /etc/systemd/system/tkinter-signage-player.service > /dev/null <<EOF
[Unit]
Description=Tkinter Signage Player
After=graphical-session.target
[Service]
Type=simple
User=pi
Environment=DISPLAY=:0
ExecStart=/home/pi/Desktop/signage-player/run_tkinter_app.sh
Restart=always
RestartSec=10
[Install]
WantedBy=graphical-session.target
EOF
# Enable the service
sudo systemctl daemon-reload
sudo systemctl enable tkinter-signage-player.service
echo "Installation completed!"
echo "The tkinter media player will start automatically on boot."
echo "To start manually, run: ./run_tkinter_app.sh"
echo "To stop the service: sudo systemctl stop tkinter-signage-player.service"
echo "To view logs: sudo journalctl -u tkinter-signage-player.service -f"

View File

@@ -1,6 +0,0 @@
kivy
requests
watchdog
Pillow
bcrypt
ffpyplayer

View File

@@ -1,17 +0,0 @@
#!/bin/bash
# filepath: /home/pi/Desktop/signage-player/run_app.sh
# Navigate to the application directory
cd /home/pi/Desktop/signage-player/src || exit
# Check for the --verbose flag
if [[ "$1" == "--verbose" ]]; then
# Run the application with terminal output
echo "Starting the application with terminal output..."
python3 media_player.py
else
# Run the application and suppress terminal output
echo "Starting the application without terminal output..."
python3 media_player.py > /dev/null 2>&1 &
fi

14
run_tkinter_debug.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Debugging launch script for the tkinter player application
# Activate the virtual environment
source venv/bin/activate
# Change to the tkinter app src directory
cd tkinter_app/src
# Run the main application with full error output
python main.py
# Deactivate virtual environment when done
deactivate

View File

@@ -1,15 +0,0 @@
[Unit]
Description=Signage Player Service
After=network.targhet
[Service]
ExecStart=/home/pi/signage-player/run_app.sh
WorkingDirectory=/home/pi/signage-player
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi
Enviroment=DISPLAY=:0
[Install]
WantedBy=multi-user.targhet

View File

@@ -1 +0,0 @@
{"screen_orientation": "Landscape", "screen_name": "rpi-tv11", "quickconnect_key": "8887779", "server_ip": "192.168.1.74", "port": "5000", "screen_w": "1920", "screen_h": "1080", "playlist_version": 7}

View File

@@ -1,43 +0,0 @@
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.74, host=, quick=8887779, port=5000
[INFO] [SignageApp] Screen size set to 1920x1080
[INFO] [SignageApp] MediaPlayer: Starting on_enter method.
[INFO] [SignageApp] MediaPlayer: Loaded server settings: server=192.168.1.74, host=, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[WARNING] [SignageApp] python_functions: Local playlist file not found.
[INFO] [SignageApp] MediaPlayer: Loaded local playlist: [], Version: 0
[WARNING] [SignageApp] MediaPlayer: No local playlist found. Attempting to load demo playlist...
[INFO] [SignageApp] MediaPlayer: Demo playlist loaded successfully.
[WARNING] [SignageApp] MediaPlayer: Invalid server settings. Using demo playlist.
[INFO] [SignageApp] MediaPlayer: Starting play_media method.
[INFO] [SignageApp] MediaPlayer: Playing media: Resurse/demo1.jpg
[INFO] [SignageApp] MediaPlayer: Starting log_event function.
2025-06-25 15:53:54 - STARTED: demo1.jpg
[INFO] [SignageApp] MediaPlayer: Logged event: 2025-06-25 15:53:54 - STARTED: demo1.jpg
[INFO] [SignageApp] MediaPlayer: Finished log_event function.
[INFO] [SignageApp] Showing image: Resurse/demo1.jpg
[INFO] [SignageApp] MediaPlayer: Finished play_media method.
[INFO] [SignageApp] MediaPlayer: Finished on_enter method.
[INFO] [SignageApp] SettingsScreen: Log messages loaded successfully.
[INFO] [SignageApp] SettingsScreen: Configuration saved.
[INFO] [SignageApp] MediaPlayer: Starting on_enter method.
[INFO] [SignageApp] MediaPlayer: Loaded server settings: server=192.168.1.74, host=rpi-tv11, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[WARNING] [SignageApp] python_functions: Local playlist file not found.
[INFO] [SignageApp] MediaPlayer: Loaded local playlist: [], Version: 0
[WARNING] [SignageApp] MediaPlayer: No local playlist found. Attempting to load demo playlist...
[INFO] [SignageApp] MediaPlayer: Demo playlist loaded successfully.
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.74:5000/api/playlists with params: {'hostname': '', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.74, host=rpi-tv11, quick=8887779, port=5000
[INFO] [SignageApp] Screen size set to 1920x1080
[INFO] [SignageApp] MediaPlayer: Starting on_enter method.
[INFO] [SignageApp] MediaPlayer: Loaded server settings: server=192.168.1.74, host=rpi-tv11, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[WARNING] [SignageApp] python_functions: Local playlist file not found.
[INFO] [SignageApp] MediaPlayer: Loaded local playlist: [], Version: 0
[WARNING] [SignageApp] MediaPlayer: No local playlist found. Attempting to load demo playlist...
[INFO] [SignageApp] MediaPlayer: Demo playlist loaded successfully.
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.74:5000/api/playlists with params: {'hostname': 'rpi-tv11', 'quickconnect_code': '8887779'}

View File

@@ -1,227 +0,0 @@
<MediaPlayer>:
video_player: video_player
image_display: image_display
Video:
id: video_player
allow_stretch: True
size_hint: (1, 1)
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
opacity: 0
keep_ratio: True
Image:
id: image_display
allow_stretch: True
keep_ratio: True
size_hint: (1, 1)
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
opacity: 0
# Settings (Home) button
Button:
id: settings_button
size_hint: None, None
size: 75, 75
pos_hint: {'right': 0.98, 'bottom': 0.98}
background_normal: './Resurse/home_icon.png'
background_down: './Resurse/home_icon.png'
background_color: 1, 1, 1, 0.9 # Temporary red background for debugging
border: [0, 0, 0, 0] # Remove the default border
opacity: 1
on_release: app.open_settings()
# Right Arrow button
Button:
id: right_arrow_button
size_hint: None, None
size: 75, 75
pos_hint: {'right': 0.93, 'bottom': 0.98}
background_normal: './Resurse/left-arrow-blue.png'
background_down: './Resurse/left-arrow-green.png'
background_color: 1, 1, 1, 0.9 # Temporary green background for debugging
border: [0, 0, 0, 0] # Remove the default border
opacity: 1
on_release: root.next_media(None)
# Play/Pause button
Button:
id: play_pause_button
size_hint: None, None
size: 75, 75
pos_hint: {'right': 0.88, 'bottom': 0.98}
background_normal: './Resurse/play.png' # Initial state
background_down: './Resurse/play.png' # Initial state
background_color: 1, 1, 1, 0.9 # White with 90% transparency
border: [0, 0, 0, 0]
opacity: 1
on_press: root.manage_play_pause_state() # Call the new function
# Left Arrow button
Button:
id: left_arrow_button
size_hint: None, None
size: 75, 75
pos_hint: {'right': 0.83, 'bottom': 0.98}
background_normal: './Resurse/right-arrow-blue.png'
background_down: './Resurse/right-arrow-green.png'
background_color: 1, 1, 1, 0.9 # Temporary yellow background for debugging
border: [0, 0, 0, 0] # Remove the default border
opacity: 1
on_release: root.previous_media()
<SettingsScreen>:
BoxLayout:
orientation: 'vertical'
padding: 20
spacing: 10
# Input fields in the upper half of the screen
BoxLayout:
orientation: 'vertical'
size_hint_y: 0.7 # Allocate 85% of the screen height for input fields
Label:
text: "Screen Orientation"
size_hint_y: None
height: 40
TextInput:
id: orientation_input
hint_text: "Enter 'portrait' or 'landscape'"
multiline: False
size_hint_y: None
height: 40
Label:
text: "Screen Name"
size_hint_y: None
height: 40
TextInput:
id: screen_name_input
hint_text: "Enter screen name"
multiline: False
size_hint_y: None
height: 40
Label:
text: "QuickConnect Key"
size_hint_y: None
height: 40
TextInput:
id: quickconnect_key_input
hint_text: "Enter QuickConnect key"
multiline: False
size_hint_y: None
height: 40
Label:
text: "Server IP / Hostname"
size_hint_y: None
height: 40
TextInput:
id: server_ip_input
hint_text: "Enter server IP or hostname"
multiline: False
size_hint_y: None
height: 40
Label:
text: "Set Port"
size_hint_y: None
height: 40
TextInput:
id: port_input
hint_text: "Enter port number"
multiline: False
size_hint_y: None
height: 40
Label:
text: "Screen Size Width / Height"
size_hint_y: None
height: 40
# New row for Screen Size Width / Height
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: 40
spacing: 10
TextInput:
id: screen_width_input
hint_text: "Width"
multiline: False
size_hint_x: 0.3
TextInput:
id: screen_height_input
hint_text: "Height"
multiline: False
size_hint_x: 0.3
# New row for testing server connection
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: 40
spacing: 10
Button:
text: "Test Connection to Server"
size_hint_x: 0.3
on_release: root.test_server_connection()
Label:
id: server_connection_label
text: "Server connection status will appear here."
size_hint_x: 0.7
# Multi-row label box for log messages
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: 200 # Adjust height as needed
padding: 10
spacing: 5
canvas.before:
Color:
rgba: 0.2, 0.2, 0.2, 1 # Dark gray background
Rectangle:
pos: self.pos
size: self.size
Color:
rgba: 1, 1, 1, 1 # White border
Line:
width: 2
rectangle: (self.x, self.y, self.width, self.height)
Label:
id: log_messages_label
text: "Log messages will appear here."
font_size: 14
font_name: "RobotoMono-Regular.ttf" # Use a monospace font
halign: 'left'
valign: 'top'
text_size: self.size
color: 1, 1, 1, 1 # White text
# Buttons in the lower part of the screen
BoxLayout:
size_hint_y: 0.4 # Allocate 40% of the screen height for buttons
spacing: 20
Button:
text: "Save"
size_hint_y: None
height: 50
on_release: root.save_config()
Button:
text: "Exit App"
size_hint_y: None
height: 50
on_release: root.show_exit_popup()

View File

@@ -1,631 +0,0 @@
from kivy.config import Config
Config.set('kivy', 'video', 'ffpyplayer')
# Now import other Kivy modules
from kivy.app import App
from kivy.uix.screenmanager import ScreenManager, Screen # Import ScreenManager and Screen for managing screens
from kivy.clock import Clock # Import Clock for scheduling tasks
from kivy.core.window import Window # Import Window for handling window events
from kivy.uix.video import Video # Import Video widget for video playback
from kivy.uix.image import Image # Import Image widget for displaying images
from kivy.logger import Logger, LoggerHistory # Import Logger for logging messages
from kivy.lang import Builder # Import Builder for loading KV files
from kivy.animation import Animation # Import Animation for fade effects
from kivy.uix.popup import Popup
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
import os # Import os for file and directory operations
import json # Import json for handling JSON data
import datetime # Import datetime for timestamping logs
import subprocess
import requests
import logging
# Import functions from python_functions.py
from python_functions import load_local_playlist, download_media_files, clean_unused_files,save_local_playlist, update_config_playlist_version, fetch_server_playlist
from logging_config import Logger # Import the shared logger
# Load the KV file for UI layout
Builder.load_file('kv/media_player.kv')
# Path to the configuration file
CONFIG_FILE = './Resurse/app_config.txt'
class MediaPlayer(Screen):
# Main screen for media playback.
def __init__(self, **kwargs):
super(MediaPlayer, self).__init__(**kwargs)
self.playlist = [] # Initialize the playlist
self.current_index = 0 # Index of the currently playing media
self.updated_playlist = None # Store the updated playlist
self.is_playlist_update_pending = False # Flag to indicate a pending playlist update
self.video_player = self.ids.video_player # Reference to the Video widget
self.image_display = self.ids.image_display # Reference to the Image widget
self.log_file = os.path.join(os.path.dirname(__file__), 'Resurse', 'log.txt') # Path to the log file
self.is_paused = False # Track the state of the play/pause button
self.reset_timer = None # Timer to reset the button state after 3 minutes
self.image_timer = None # Timer for scheduling the next media for images
# Load screen size from the configuration file
self.load_screen_size()
# Schedule periodic updates to check for playlist updates
Clock.schedule_interval(self.check_playlist_updates, 300) # Every 5 minutes
# Bind key events to handle fullscreen toggle
Window.bind(on_key_down=self.on_key_down)
# Start a timer to hide the buttons after 10 seconds
self.hide_button_timer = Clock.schedule_once(self.hide_buttons, 10)
def load_screen_size(self):
"""Load screen size from the configuration file and set the window size."""
if os.path.exists(CONFIG_FILE):
with open(CONFIG_FILE, 'r') as file:
config_data = json.load(file)
screen_w = config_data.get("screen_w", "1920")
screen_h = config_data.get("screen_h", "1080")
# Set the window size
try:
Window.size = (int(screen_w), int(screen_h))
Logger.info(f"Screen size set to {screen_w}x{screen_h}")
except ValueError:
Logger.error("Invalid screen size values in configuration file.")
def on_touch_down(self, touch):
# Handle touch events to reset the button visibility.
self.show_buttons() # Make all buttons visible
if hasattr(self, 'hide_button_timer'):
Clock.unschedule(self.hide_button_timer) # Cancel the existing hide timer
self.hide_button_timer = Clock.schedule_once(self.hide_buttons, 10) # Restart the hide timer
return super(MediaPlayer, self).on_touch_down(touch)
def hide_buttons(self, *args):
# Hide all buttons after inactivity.
self.ids.settings_button.opacity = 0 # Hide the Home button
self.ids.right_arrow_button.opacity = 0 # Hide the Right Arrow button
self.ids.play_pause_button.opacity = 0 # Hide the Play/Pause button
self.ids.left_arrow_button.opacity = 0 # Hide the Left Arrow button
def show_buttons(self):
# Show all buttons.
self.ids.settings_button.opacity = 1 # Show the Home button
self.ids.right_arrow_button.opacity = 1 # Show the Right Arrow button
self.ids.play_pause_button.opacity = 1 # Show the Play/Pause button
self.ids.left_arrow_button.opacity = 1 # Show the Left Arrow button
def on_key_down(self, window, key, *args):
# Handle key events for toggling fullscreen mode.
if key == 102: # 'f' key
Window.fullscreen = not Window.fullscreen
def on_enter(self):
"""Called when the screen is entered."""
Logger.info("MediaPlayer: Starting on_enter method.")
# Load server settings from the configuration file
if os.path.exists(CONFIG_FILE):
try:
with open(CONFIG_FILE, 'r') as file:
config_data = json.load(file)
server = config_data.get("server_ip", "")
host = config_data.get("screen_name", "")
quick = config_data.get("quickconnect_key", "")
port = config_data.get("port", "")
Logger.info(f"MediaPlayer: Loaded server settings: server={server}, host={host}, quick={quick}, port={port}")
except json.JSONDecodeError as e:
Logger.error(f"MediaPlayer: Failed to parse configuration file. Error: {e}")
server, host, quick, port = "", "", "", ""
else:
Logger.warning(f"MediaPlayer: Configuration file {CONFIG_FILE} not found. Defaulting server settings to empty.")
server, host, quick, port = "", "", "", ""
# Attempt to load the local playlist
local_playlist_data = load_local_playlist()
self.playlist = local_playlist_data.get('playlist', []) # Extract the playlist key
local_version = local_playlist_data.get('version', 0) # Extract the local playlist version
Logger.info(f"MediaPlayer: Loaded local playlist: {self.playlist}, Version: {local_version}")
# Check if the local playlist exists
if not self.playlist: # If no local playlist exists
Logger.warning("MediaPlayer: No local playlist found. Attempting to load demo playlist...")
# Load the demo playlist
demo_playlist_path = os.path.join(os.path.dirname(__file__), 'Resurse', 'demo_playlist.json')
if os.path.exists(demo_playlist_path):
try:
with open(demo_playlist_path, 'r') as demo_file:
demo_playlist_data = json.load(demo_file) # Pass the file object to json.load()
self.playlist = demo_playlist_data.get('playlist', []) # Extract the playlist key
Logger.info("MediaPlayer: Demo playlist loaded successfully.")
except json.JSONDecodeError as e:
Logger.error(f"MediaPlayer: Failed to parse demo playlist file. Error: {e}")
else:
Logger.error("MediaPlayer: Demo playlist file not found. No media to play.")
return
# Check if server settings are valid
if not self.playlist or not server or not host or not quick or not port:
Logger.warning("MediaPlayer: Invalid server settings. Using demo playlist.")
else:
# Fetch the server playlist
server_playlist_data = fetch_server_playlist()
server_playlist = server_playlist_data.get('playlist', [])
server_version = server_playlist_data.get('version', 0)
if server_playlist: # If server playlist is valid
Logger.info("MediaPlayer: Server playlist fetched successfully.")
# Download media files and save the playlist locally
download_media_files(server_playlist, server_version)
update_config_playlist_version(server_version) # Update playlist version in app_config.txt
# Reload the updated local playlist
local_playlist_data = load_local_playlist()
self.playlist = local_playlist_data.get('playlist', []) # Extract the playlist key
Logger.info("MediaPlayer: Local playlist updated successfully.")
else:
Logger.error("MediaPlayer: Failed to fetch server playlist. No media to play.")
return
if self.playlist: # If the playlist is loaded successfully
self.play_media() # Start playing media
self.show_buttons() # Ensure buttons are visible when the screen is entered
else:
Logger.warning("MediaPlayer: Playlist is empty. No media to play.")
Logger.info("MediaPlayer: Finished on_enter method.")
def log_event(self, file_name, event):
"""Log the start or stop event of a media file."""
Logger.info("MediaPlayer: Starting log_event function.")
try:
# Get the current timestamp
timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
log_message = f"{timestamp} - {event}: {file_name}\n" # Format the log message
# Write the log message to the log file
with open(self.log_file, 'a') as log:
log.write(log_message)
Logger.info(f"MediaPlayer: Logged event: {log_message.strip()}")
except Exception as e:
Logger.error(f"MediaPlayer: Failed to log event: {e}")
Logger.info("MediaPlayer: Finished log_event function.")
def cleanup_old_logs(self):
"""Delete log entries older than 24 hours."""
Logger.info("MediaPlayer: Starting cleanup_old_logs function.")
try:
# Read all log entries
if os.path.exists(self.log_file):
with open(self.log_file, 'r') as log:
lines = log.readlines()
# Get the current time
now = datetime.datetime.now()
# Filter out log entries older than 24 hours
filtered_lines = []
for line in lines:
try:
# Extract the timestamp from the log entry
timestamp_str = line.split(' - ')[0]
log_time = datetime.datetime.strptime(timestamp_str, '%Y-%m-%d %H:%M:%S')
# Keep the log entry if it's within the last 24 hours
if (now - log_time).total_seconds() <= 86400: # 24 hours in seconds
filtered_lines.append(line)
except (ValueError, IndexError):
# If the log entry is malformed, log the issue but do not raise warnings
Logger.info(f"MediaPlayer: Skipping malformed log entry: {line.strip()}")
# Write the filtered log entries back to the log file
with open(self.log_file, 'w') as log:
log.writelines(filtered_lines)
Logger.info("MediaPlayer: Old log entries cleaned up successfully.")
except Exception as e:
Logger.error(f"MediaPlayer: Failed to clean up old logs: {e}")
Logger.info("MediaPlayer: Finished cleanup_old_logs function.")
def play_media(self):
"""Play the current media in the playlist."""
Logger.info("MediaPlayer: Starting play_media method.")
if not self.playlist or not isinstance(self.playlist, list):
Logger.error("MediaPlayer: Playlist is invalid or empty. Cannot play media.")
return
media = self.playlist[self.current_index] # Get the current media
file_name = media.get('file_name', '') # Get the file name
file_path = media.get('url', '') # Use the exact path specified in the playlist
duration = media.get('duration', 10) # Get the duration (default: 10 seconds)
Logger.info(f"MediaPlayer: Playing media: {file_path}")
# Check if the file exists
if not os.path.exists(file_path):
Logger.error(f"MediaPlayer: Media file not found: {file_path}")
return
# Cancel any existing timers
if self.image_timer:
Logger.info("MediaPlayer: Canceling existing image timer.")
Clock.unschedule(self.image_timer)
# Log the start of the media
self.log_event(file_name, "STARTED")
# Determine the type of media and play it
file_extension = os.path.splitext(file_name)[1].lower() # Get the file extension
if file_extension in ['.mp4', '.avi', '.mov']:
self.play_video(file_path) # Play video
elif file_extension in ['.jpg', '.jpeg', '.png', '.gif']:
self.show_image(file_path, duration) # Show image
else:
Logger.error(f"MediaPlayer: Unsupported media type for file: {file_name}")
Logger.info("MediaPlayer: Finished play_media method.")
def play_video(self, file_path):
"""Play a video file without a fade-in effect."""
Logger.info(f"MediaPlayer: Attempting to play video: {file_path}")
if not os.path.exists(file_path):
Logger.error(f"MediaPlayer: Video file not found: {file_path}")
return
Logger.info(f"MediaPlayer: Video file exists. Setting up video player...")
# Set the video source and start playback
self.video_player.source = file_path
self.video_player.state = 'play' # Start playing the video
self.video_player.audio = True # Enable audio playback
self.video_player.opacity = 1 # Ensure the video is fully visible
self.image_display.opacity = 0 # Hide the image display
# Schedule the next media after the video's duration
if self.video_player.duration > 0:
Logger.info(f"MediaPlayer: Video duration detected: {self.video_player.duration} seconds.")
Clock.schedule_once(self.next_media, self.video_player.duration)
else:
Logger.warning("MediaPlayer: Video duration is unknown. Using default duration.")
def show_image(self, file_path, duration):
"""Display an image with a fade-in effect."""
Logger.info(f"Showing image: {file_path}")
if not os.path.exists(file_path):
Logger.error(f"Image file not found: {file_path}")
return
# Set the image source
self.image_display.source = file_path
self.image_display.opacity = 0 # Start with the image hidden
self.image_display.reload() # Reload the image to ensure it updates
self.video_player.opacity = 0 # Hide the video player
# Create a fade-in animation
fade_in = Animation(opacity=1, duration=1) # Fade in over 1 second
fade_in.start(self.image_display) # Start the fade-in animation
# Schedule the next media after the duration
self.image_timer = Clock.schedule_once(self.next_media, duration)
def next_media(self, dt=None):
"""Move to the next media in the playlist."""
Logger.info("Navigating to the next media.")
# Cancel any existing timers
if self.image_timer:
Logger.info("Canceling image timer.")
Clock.unschedule(self.image_timer)
# Update the current index
self.current_index += 1
# Check if the end of the playlist is reached
if self.current_index >= len(self.playlist):
Logger.info("End of playlist reached. Checking for updates...")
self.current_index = 0 # Reset the index to start from the beginning
# Fetch the server playlist
server_playlist_data = fetch_server_playlist()
server_playlist = server_playlist_data.get('playlist', [])
server_version = server_playlist_data.get('version', 0)
# Load the local playlist
local_playlist_data = load_local_playlist()
local_version = local_playlist_data.get('version', 0)
# Compare versions
if server_version > local_version: # Update only if server version is newer
Logger.info(f"Playlist version mismatch detected. Local version: {local_version}, Server version: {server_version}")
# Clean up old media files
clean_unused_files(local_playlist_data.get('playlist', []))
# Update the local playlist and download new media files
download_media_files(server_playlist, server_version)
local_playlist_data = load_local_playlist() # Reload the updated local playlist
self.playlist = local_playlist_data.get('playlist', []) # Extract the playlist key
Logger.info("Playlist updated successfully.")
else:
Logger.info("Playlist versions match. No update needed.")
# Play the next media
self.play_media()
def previous_media(self):
"""Move to the previous media in the playlist."""
Logger.info("Navigating to the previous media.")
# Cancel any existing timers
if self.image_timer:
Logger.info("Canceling image timer.")
Clock.unschedule(self.image_timer)
# Update the current index
self.current_index = (self.current_index - 1) % len(self.playlist)
# Play the previous media
self.play_media()
def toggle_play_pause(self):
#Toggle the play/pause button state and update its appearance.
self.manage_play_pause_state()
def manage_play_pause_state(self):
# Manage the state of the play/pause button and media playback.
if self.is_paused:
Logger.info("Resuming media playback.")
self.video_player.state = 'play'
# Resume the image timer if it exists
if self.image_timer:
Logger.info("Resuming image timer.")
self.image_timer()
# Update the button to indicate the playing state
self.ids.play_pause_button.background_down = './Resurse/play.png'
self.ids.play_pause_button.background_normal = './Resurse/play.png'
# Cancel the reset timer if it exists
if self.reset_timer:
Clock.unschedule(self.reset_timer)
else:
Logger.info("Pausing media playback.")
self.video_player.state = 'pause'
# Pause the image timer if it exists
if self.image_timer:
Logger.info("Pausing image timer.")
Clock.unschedule(self.image_timer)
# Update the button to indicate the paused state
self.ids.play_pause_button.background_down = './Resurse/pause.png'
self.ids.play_pause_button.background_normal = './Resurse/pause.png'
# Start a timer to reset the button state after 30 seconds
self.reset_timer = Clock.schedule_once(self.reset_play_pause_state, 30)
# Toggle the state
self.is_paused = not self.is_paused
def reset_play_pause_state(self, dt):
# Reset the play/pause button state to 'play' after 30 seconds.
Logger.info("Resetting play/pause button state to 'play' after timeout.")
self.is_paused = False
self.video_player.state = 'play'
# Resume the image timer if it exists
if self.image_timer:
Logger.info("Resuming image timer.")
self.image_timer()
# Update the button appearance
self.ids.play_pause_button.background_down = './Resurse/play.png'
self.ids.play_pause_button.background_normal = './Resurse/play.png'
def check_playlist_updates(self, dt):
"""Check for updates to the playlist using the playlist_version from app_config.txt."""
Logger.info("Checking for playlist updates...")
# Load the playlist version from app_config.txt
if os.path.exists(CONFIG_FILE):
try:
with open(CONFIG_FILE, 'r') as file:
config_data = json.load(file)
local_version = config_data.get('playlist_version', 0) # Get the local playlist version
Logger.info(f"Loaded local playlist version from app_config.txt: {local_version}")
except json.JSONDecodeError as e:
Logger.error(f"Failed to parse app_config.txt. Error: {e}")
local_version = 0
else:
Logger.warning(f"Configuration file {CONFIG_FILE} not found. Defaulting local playlist version to 0.")
local_version = 0
# Fetch the server playlist
server_playlist_data = fetch_server_playlist()
server_playlist = server_playlist_data.get('playlist', [])
server_version = server_playlist_data.get('version', 0)
# Compare versions
if server_version > local_version: # Update only if server version is newer
Logger.info(f"Playlist version mismatch detected. Local version: {local_version}, Server version: {server_version}")
# Clean up old media files
local_playlist_data = load_local_playlist()
clean_unused_files(local_playlist_data.get('playlist', []))
# Update the local playlist and download new media files
download_media_files(server_playlist, server_version)
local_playlist_data = load_local_playlist() # Reload the updated local playlist
self.playlist = local_playlist_data.get('playlist', []) # Extract the playlist key
Logger.info("Playlist updated successfully.")
else:
Logger.info("Playlist versions match. No update needed.")
class SettingsScreen(Screen):
"""Settings screen for configuring the app."""
def __init__(self, **kwargs):
super(SettingsScreen, self).__init__(**kwargs)
self.config_data = self.load_config() # Load the configuration data
def load_config(self):
"""Load the configuration from the config file."""
if os.path.exists(CONFIG_FILE):
with open(CONFIG_FILE, 'r') as file:
return json.load(file)
return {
"screen_orientation": "",
"screen_name": "",
"quickconnect_key": "",
"server_ip": "",
"port": "",
"screen_w": "", # Default width
"screen_h": "", # Default height
"playlist_version": 0 # Default playlist version
}
def load_log_messages(self):
"""Load the last 10 log messages and update the label."""
log_file_path = os.path.join(os.path.dirname(__file__), 'Resurse', 'log.txt')
if not os.path.exists(log_file_path):
self.ids.log_messages_label.text = "No log messages available."
Logger.warning("SettingsScreen: Log file not found.")
return
try:
with open(log_file_path, 'r') as log_file:
lines = log_file.readlines()
# Get the last 10 log messages
last_messages = lines[-10:] if len(lines) > 10 else lines
# Format the messages for display
formatted_messages = "\n".join([line.strip() for line in last_messages])
self.ids.log_messages_label.text = formatted_messages
Logger.info("SettingsScreen: Log messages loaded successfully.")
except Exception as e:
self.ids.log_messages_label.text = "Failed to load log messages."
Logger.error(f"SettingsScreen: Error loading log messages: {e}")
def save_config(self):
"""Save the configuration to the config file."""
self.config_data["screen_orientation"] = self.ids.orientation_input.text
self.config_data["screen_name"] = self.ids.screen_name_input.text
self.config_data["quickconnect_key"] = self.ids.quickconnect_key_input.text
self.config_data["server_ip"] = self.ids.server_ip_input.text
self.config_data["port"] = self.ids.port_input.text
self.config_data["screen_w"] = self.ids.screen_width_input.text
self.config_data["screen_h"] = self.ids.screen_height_input.text
with open(CONFIG_FILE, 'w') as file:
json.dump(self.config_data, file)
Logger.info("SettingsScreen: Configuration saved.")
# Return to the MediaPlayer screen after saving
self.manager.current = 'media_player'
def on_pre_enter(self):
"""Populate input fields with current config data."""
self.ids.orientation_input.text = self.config_data.get("screen_orientation", "landscape")
self.ids.screen_name_input.text = self.config_data.get("screen_name", "")
self.ids.quickconnect_key_input.text = self.config_data.get("quickconnect_key", "")
self.ids.server_ip_input.text = self.config_data.get("server_ip", "")
self.ids.port_input.text = self.config_data.get("port", "8080")
self.ids.screen_width_input.text = self.config_data.get("screen_w", "")
self.ids.screen_height_input.text = self.config_data.get("screen_h", "")
# Load the last 10 log messages
self.load_log_messages()
def show_exit_popup(self):
# Create the popup layout
layout = BoxLayout(orientation='vertical', spacing=10, padding=10)
# Add a label
label = Label(text="Enter Password to Exit", size_hint=(1, 0.3))
layout.add_widget(label)
# Add a password input field
password_input = TextInput(password=True, multiline=False, size_hint=(1, 0.3))
layout.add_widget(password_input)
# Add buttons for "OK" and "Cancel"
button_layout = BoxLayout(size_hint=(1, 0.3), spacing=10)
ok_button = Button(text="OK", on_release=lambda *args: self.validate_exit_password(password_input.text, popup))
cancel_button = Button(text="Cancel", on_release=lambda *args: popup.dismiss())
button_layout.add_widget(ok_button)
button_layout.add_widget(cancel_button)
layout.add_widget(button_layout)
# Create the popup
popup = Popup(title="Exit App", content=layout, size_hint=(0.8, 0.4))
popup.open()
def validate_exit_password(self, password, popup):
# Validate the entered password
quickconnect_key = self.config_data.get("quickconnect_key", "")
if password == quickconnect_key:
Logger.info("Password correct. Exiting app.")
App.get_running_app().stop() # Exit the app
else:
Logger.warning("Incorrect password. Returning to SettingsScreen.")
popup.dismiss() # Close the popup
def test_server_connection(self):
"""Test the connection to the server and update the label."""
Logger.info("SettingsScreen: Testing connection to server...")
# Load configuration data
server_ip = self.config_data.get("server_ip", "")
port = self.config_data.get("port", "")
local_version = self.config_data.get("playlist_version", 0)
if not server_ip or not port:
self.ids.server_connection_label.text = "Server IP or port is not configured."
Logger.error("SettingsScreen: Server IP or port is missing in configuration.")
return
try:
# Construct the server URL
url = f"http://{server_ip}:{port}/api/playlists"
params = {
'hostname': self.config_data.get("screen_name", ""),
'quickconnect_code': self.config_data.get("quickconnect_key", "")
}
Logger.info(f"SettingsScreen: Sending request to {url} with params: {params}...")
response = requests.get(url, params=params, timeout=5)
if response.status_code == 200:
response_data = response.json()
server_version = response_data.get("playlist_version", "Unknown")
self.ids.server_connection_label.text = (
f"Server is reachable. Playlist version on server: {server_version}. "
f"Playlist version on player: {local_version}."
)
Logger.info("SettingsScreen: Server is reachable.")
else:
self.ids.server_connection_label.text = f"Server unreachable. Status code: {response.status_code}."
Logger.error(f"SettingsScreen: Failed to reach server. Status code: {response.status_code}.")
except requests.exceptions.RequestException as e:
self.ids.server_connection_label.text = "Server unreachable. Check connection settings."
Logger.error(f"SettingsScreen: Error connecting to server: {e}")
class MediaPlayerApp(App):
"""Main application class."""
def build(self):
"""Build the app and initialize screens."""
Window.fullscreen = True # Start the app in fullscreen mode
sm = ScreenManager() # Create a screen manager
sm.add_widget(MediaPlayer(name='media_player')) # Add the MediaPlayer screen
sm.add_widget(SettingsScreen(name='settings')) # Add the SettingsScreen
return sm
def open_settings(self):
"""Switch to the SettingsScreen."""
self.root.current = 'settings'
if __name__ == '__main__':
MediaPlayerApp().run() # Run the app

View File

@@ -0,0 +1,10 @@
{
"screen_orientation": "Landscape",
"screen_name": "tv-holba1",
"quickconnect_key": "8887779",
"server_ip": "192.168.1.245",
"port": "5000",
"screen_w": "1920",
"screen_h": "1080",
"playlist_version": 5
}

View File

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

View File

Before

Width:  |  Height:  |  Size: 537 KiB

After

Width:  |  Height:  |  Size: 537 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,20 @@
{
"playlist": [
{
"file_name": "1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg",
"url": "static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg",
"duration": 20
},
{
"file_name": "wp2782770-1846651530.jpg",
"url": "static/resurse/wp2782770-1846651530.jpg",
"duration": 15
},
{
"file_name": "SampleVideo_1280x720_1mb.mp4",
"url": "static/resurse/SampleVideo_1280x720_1mb.mp4",
"duration": 5
}
],
"version": 5
}

View File

@@ -0,0 +1,833 @@
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.74, host=, quick=8887779, port=5000
[INFO] [SignageApp] Screen size set to 1920x1080
[INFO] [SignageApp] MediaPlayer: Starting on_enter method.
[INFO] [SignageApp] MediaPlayer: Loaded server settings: server=192.168.1.74, host=, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[WARNING] [SignageApp] python_functions: Local playlist file not found.
[INFO] [SignageApp] MediaPlayer: Loaded local playlist: [], Version: 0
[WARNING] [SignageApp] MediaPlayer: No local playlist found. Attempting to load demo playlist...
[INFO] [SignageApp] MediaPlayer: Demo playlist loaded successfully.
[WARNING] [SignageApp] MediaPlayer: Invalid server settings. Using demo playlist.
[INFO] [SignageApp] MediaPlayer: Starting play_media method.
[INFO] [SignageApp] MediaPlayer: Playing media: Resurse/demo1.jpg
[INFO] [SignageApp] MediaPlayer: Starting log_event function.
2025-06-25 15:53:54 - STARTED: demo1.jpg
[INFO] [SignageApp] MediaPlayer: Logged event: 2025-06-25 15:53:54 - STARTED: demo1.jpg
[INFO] [SignageApp] MediaPlayer: Finished log_event function.
[INFO] [SignageApp] Showing image: Resurse/demo1.jpg
[INFO] [SignageApp] MediaPlayer: Finished play_media method.
[INFO] [SignageApp] MediaPlayer: Finished on_enter method.
[INFO] [SignageApp] SettingsScreen: Log messages loaded successfully.
[INFO] [SignageApp] SettingsScreen: Configuration saved.
[INFO] [SignageApp] MediaPlayer: Starting on_enter method.
[INFO] [SignageApp] MediaPlayer: Loaded server settings: server=192.168.1.74, host=rpi-tv11, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[WARNING] [SignageApp] python_functions: Local playlist file not found.
[INFO] [SignageApp] MediaPlayer: Loaded local playlist: [], Version: 0
[WARNING] [SignageApp] MediaPlayer: No local playlist found. Attempting to load demo playlist...
[INFO] [SignageApp] MediaPlayer: Demo playlist loaded successfully.
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.74:5000/api/playlists with params: {'hostname': '', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.74, host=rpi-tv11, quick=8887779, port=5000
[INFO] [SignageApp] Screen size set to 1920x1080
[INFO] [SignageApp] MediaPlayer: Starting on_enter method.
[INFO] [SignageApp] MediaPlayer: Loaded server settings: server=192.168.1.74, host=rpi-tv11, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[WARNING] [SignageApp] python_functions: Local playlist file not found.
[INFO] [SignageApp] MediaPlayer: Loaded local playlist: [], Version: 0
[WARNING] [SignageApp] MediaPlayer: No local playlist found. Attempting to load demo playlist...
[INFO] [SignageApp] MediaPlayer: Demo playlist loaded successfully.
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.74:5000/api/playlists with params: {'hostname': 'rpi-tv11', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.74, host=rpi-tv11, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[WARNING] [SignageApp] python_functions: Local playlist file not found.
[WARNING] [SignageApp] No local playlist found, creating demo content
[INFO] [SignageApp] Created demo playlist with 9 images
[INFO] [SignageApp] Playing media: left-arrow-green.png
2025-08-05 12:22:33 - STARTED: left-arrow-green.png
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Playing media: pause.png
2025-08-05 12:22:38 - STARTED: pause.png
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: home_icon.png
2025-08-05 12:22:44 - STARTED: home_icon.png
[INFO] [SignageApp] Playing media: play.png
2025-08-05 12:22:49 - STARTED: play.png
[INFO] [SignageApp] Playing media: demo1.jpg
2025-08-05 12:22:54 - STARTED: demo1.jpg
[INFO] [SignageApp] Playing media: demo2.jpeg
2025-08-05 12:22:59 - STARTED: demo2.jpeg
[INFO] [SignageApp] Playing media: left-arrow-blue.png
2025-08-05 12:23:04 - STARTED: left-arrow-blue.png
[INFO] [SignageApp] Playing media: right-arrow-blue.png
2025-08-05 12:23:09 - STARTED: right-arrow-blue.png
[INFO] [SignageApp] Playing media: right-arrow-green.png
2025-08-05 12:23:15 - STARTED: right-arrow-green.png
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: left-arrow-green.png
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 12:23:20 - STARTED: left-arrow-green.png
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.74:5000/api/playlists with params: {'hostname': 'rpi-tv11', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.74', port=5000): Max retries exceeded with url: /api/playlists?hostname=rpi-tv11&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf4fc2090>: Failed to establish a new connection: [Errno 113] No route to host'))
[INFO] [SignageApp] Playing media: pause.png
2025-08-05 12:23:25 - STARTED: pause.png
[INFO] [SignageApp] Playing media: home_icon.png
2025-08-05 12:23:30 - STARTED: home_icon.png
[INFO] [SignageApp] Playing media: play.png
2025-08-05 12:23:35 - STARTED: play.png
[INFO] [SignageApp] Playing media: demo1.jpg
2025-08-05 12:23:40 - STARTED: demo1.jpg
[INFO] [SignageApp] Playing media: demo2.jpeg
2025-08-05 12:23:45 - STARTED: demo2.jpeg
[INFO] [SignageApp] Playing media: left-arrow-blue.png
2025-08-05 12:23:51 - STARTED: left-arrow-blue.png
[INFO] [SignageApp] Playing media: right-arrow-blue.png
2025-08-05 12:23:56 - STARTED: right-arrow-blue.png
[INFO] [SignageApp] Playing media: right-arrow-green.png
2025-08-05 12:24:01 - STARTED: right-arrow-green.png
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: left-arrow-green.png
2025-08-05 12:24:06 - STARTED: left-arrow-green.png
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.74:5000/api/playlists with params: {'hostname': 'rpi-tv11', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.74', port=5000): Max retries exceeded with url: /api/playlists?hostname=rpi-tv11&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf58310d0>: Failed to establish a new connection: [Errno 113] No route to host'))
[INFO] [SignageApp] Playing media: pause.png
2025-08-05 12:24:11 - STARTED: pause.png
[INFO] [SignageApp] Playing media: home_icon.png
2025-08-05 12:24:16 - STARTED: home_icon.png
[INFO] [SignageApp] Playing media: play.png
2025-08-05 12:24:21 - STARTED: play.png
[INFO] [SignageApp] Playing media: demo1.jpg
2025-08-05 12:24:26 - STARTED: demo1.jpg
[INFO] [SignageApp] Playing media: demo2.jpeg
2025-08-05 12:24:31 - STARTED: demo2.jpeg
[INFO] [SignageApp] Playing media: left-arrow-blue.png
2025-08-05 12:24:37 - STARTED: left-arrow-blue.png
[INFO] [SignageApp] Playing media: right-arrow-blue.png
2025-08-05 12:24:42 - STARTED: right-arrow-blue.png
[INFO] [SignageApp] Playing media: right-arrow-green.png
2025-08-05 12:24:47 - STARTED: right-arrow-green.png
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: left-arrow-green.png
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 12:24:52 - STARTED: left-arrow-green.png
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.74:5000/api/playlists with params: {'hostname': 'rpi-tv11', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.74', port=5000): Max retries exceeded with url: /api/playlists?hostname=rpi-tv11&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf4fc2690>: Failed to establish a new connection: [Errno 113] No route to host'))
[INFO] [SignageApp] Playing media: pause.png
2025-08-05 12:24:57 - STARTED: pause.png
[INFO] [SignageApp] Playing media: home_icon.png
2025-08-05 12:25:02 - STARTED: home_icon.png
[INFO] [SignageApp] Playing media: play.png
2025-08-05 12:25:07 - STARTED: play.png
[INFO] [SignageApp] Playing media: demo1.jpg
2025-08-05 12:25:12 - STARTED: demo1.jpg
[INFO] [SignageApp] Playing media: demo2.jpeg
2025-08-05 12:25:17 - STARTED: demo2.jpeg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Configuration saved via settings window
[INFO] [SignageApp] Playing media: left-arrow-blue.png
2025-08-05 12:25:23 - STARTED: left-arrow-blue.png
[INFO] [SignageApp] Playing media: right-arrow-blue.png
2025-08-05 12:25:28 - STARTED: right-arrow-blue.png
[INFO] [SignageApp] Playing media: right-arrow-green.png
2025-08-05 12:25:33 - STARTED: right-arrow-green.png
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: left-arrow-green.png
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 12:25:38 - STARTED: left-arrow-green.png
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.74:5000/api/playlists with params: {'hostname': 'rpi-tv11', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.74', port=5000): Max retries exceeded with url: /api/playlists?hostname=rpi-tv11&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf5824ff0>: Failed to establish a new connection: [Errno 113] No route to host'))
[INFO] [SignageApp] Playing media: pause.png
2025-08-05 12:25:43 - STARTED: pause.png
[INFO] [SignageApp] Playing media: home_icon.png
2025-08-05 12:25:48 - STARTED: home_icon.png
[INFO] [SignageApp] Playing media: play.png
2025-08-05 12:25:50 - STARTED: play.png
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: demo1.jpg
2025-08-05 12:25:55 - STARTED: demo1.jpg
[INFO] [SignageApp] Playing media: demo2.jpeg
2025-08-05 12:26:01 - STARTED: demo2.jpeg
[INFO] [SignageApp] Playing media: left-arrow-blue.png
2025-08-05 12:26:06 - STARTED: left-arrow-blue.png
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[WARNING] [SignageApp] python_functions: Local playlist file not found.
[WARNING] [SignageApp] No local playlist found, creating demo content
[INFO] [SignageApp] Created demo playlist with 9 images
[INFO] [SignageApp] Playing media: left-arrow-green.png
2025-08-05 12:29:21 - STARTED: left-arrow-green.png
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Playing media: pause.png
2025-08-05 12:29:26 - STARTED: pause.png
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: home_icon.png
2025-08-05 12:29:31 - STARTED: home_icon.png
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: play.png
2025-08-05 12:29:36 - STARTED: play.png
[INFO] [SignageApp] Playing media: demo1.jpg
2025-08-05 12:29:41 - STARTED: demo1.jpg
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[ERROR] [SignageApp] python_functions: Configuration file ./Resurse/app_config.txt not found.
[INFO] [SignageApp] python_functions: Configuration loaded: server=, host=, quick=, port=
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': 'har_page_001.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_001.jpg'}, {'duration': 20, 'file_name': 'har_page_002.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_002.jpg'}, {'duration': 20, 'file_name': 'har_page_003.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_003.jpg'}, {'duration': 20, 'file_name': 'har_page_004.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_004.jpg'}, {'duration': 20, 'file_name': 'har_page_005.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_005.jpg'}, {'duration': 20, 'file_name': 'har_page_006.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_006.jpg'}, {'duration': 20, 'file_name': 'har_page_007.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_007.jpg'}, {'duration': 20, 'file_name': 'har_page_008.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_008.jpg'}, {'duration': 20, 'file_name': 'har_page_009.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_009.jpg'}, {'duration': 20, 'file_name': 'har_page_010.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_010.jpg'}], 'playlist_version': 4}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 4.
[INFO] [SignageApp] Server playlist found with 10 items, version 4
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: Created directory /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse for media files.
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_001.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_001.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_002.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_002.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_003.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_003.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_004.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_004.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_005.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_005.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_006.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_006.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_007.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_007.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_008.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_008.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_009.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_009.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded har_page_010.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/har_page_010.jpg
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 4.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': 'har_page_001.jpg', 'url': 'static/resurse/har_page_001.jpg', 'duration': 20}, {'file_name': 'har_page_002.jpg', 'url': 'static/resurse/har_page_002.jpg', 'duration': 20}, {'file_name': 'har_page_003.jpg', 'url': 'static/resurse/har_page_003.jpg', 'duration': 20}, {'file_name': 'har_page_004.jpg', 'url': 'static/resurse/har_page_004.jpg', 'duration': 20}, {'file_name': 'har_page_005.jpg', 'url': 'static/resurse/har_page_005.jpg', 'duration': 20}, {'file_name': 'har_page_006.jpg', 'url': 'static/resurse/har_page_006.jpg', 'duration': 20}, {'file_name': 'har_page_007.jpg', 'url': 'static/resurse/har_page_007.jpg', 'duration': 20}, {'file_name': 'har_page_008.jpg', 'url': 'static/resurse/har_page_008.jpg', 'duration': 20}, {'file_name': 'har_page_009.jpg', 'url': 'static/resurse/har_page_009.jpg', 'duration': 20}, {'file_name': 'har_page_010.jpg', 'url': 'static/resurse/har_page_010.jpg', 'duration': 20}], 'version': 4}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 10 items from server
[INFO] [SignageApp] Playing media: har_page_001.jpg from static/resurse/har_page_001.jpg
2025-08-05 13:52:51 - STARTED: har_page_001.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': 'har_page_001.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_001.jpg'}, {'duration': 20, 'file_name': 'har_page_002.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_002.jpg'}, {'duration': 20, 'file_name': 'har_page_003.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_003.jpg'}, {'duration': 20, 'file_name': 'har_page_004.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_004.jpg'}, {'duration': 20, 'file_name': 'har_page_005.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_005.jpg'}, {'duration': 20, 'file_name': 'har_page_006.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_006.jpg'}, {'duration': 20, 'file_name': 'har_page_007.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_007.jpg'}, {'duration': 20, 'file_name': 'har_page_008.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_008.jpg'}, {'duration': 20, 'file_name': 'har_page_009.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_009.jpg'}, {'duration': 20, 'file_name': 'har_page_010.jpg', 'url': 'http://192.168.1.245:5000/media/har_page_010.jpg'}], 'playlist_version': 4}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 4.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': 'har_page_001.jpg', 'url': 'static/resurse/har_page_001.jpg', 'duration': 20}, {'file_name': 'har_page_002.jpg', 'url': 'static/resurse/har_page_002.jpg', 'duration': 20}, {'file_name': 'har_page_003.jpg', 'url': 'static/resurse/har_page_003.jpg', 'duration': 20}, {'file_name': 'har_page_004.jpg', 'url': 'static/resurse/har_page_004.jpg', 'duration': 20}, {'file_name': 'har_page_005.jpg', 'url': 'static/resurse/har_page_005.jpg', 'duration': 20}, {'file_name': 'har_page_006.jpg', 'url': 'static/resurse/har_page_006.jpg', 'duration': 20}, {'file_name': 'har_page_007.jpg', 'url': 'static/resurse/har_page_007.jpg', 'duration': 20}, {'file_name': 'har_page_008.jpg', 'url': 'static/resurse/har_page_008.jpg', 'duration': 20}, {'file_name': 'har_page_009.jpg', 'url': 'static/resurse/har_page_009.jpg', 'duration': 20}, {'file_name': 'har_page_010.jpg', 'url': 'static/resurse/har_page_010.jpg', 'duration': 20}], 'version': 4}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] python_functions: Cleaning unused media files...
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: File har_page_001.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_002.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_003.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_004.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_005.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_006.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_007.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_008.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_009.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File har_page_010.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 4.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': 'har_page_001.jpg', 'url': 'static/resurse/har_page_001.jpg', 'duration': 20}, {'file_name': 'har_page_002.jpg', 'url': 'static/resurse/har_page_002.jpg', 'duration': 20}, {'file_name': 'har_page_003.jpg', 'url': 'static/resurse/har_page_003.jpg', 'duration': 20}, {'file_name': 'har_page_004.jpg', 'url': 'static/resurse/har_page_004.jpg', 'duration': 20}, {'file_name': 'har_page_005.jpg', 'url': 'static/resurse/har_page_005.jpg', 'duration': 20}, {'file_name': 'har_page_006.jpg', 'url': 'static/resurse/har_page_006.jpg', 'duration': 20}, {'file_name': 'har_page_007.jpg', 'url': 'static/resurse/har_page_007.jpg', 'duration': 20}, {'file_name': 'har_page_008.jpg', 'url': 'static/resurse/har_page_008.jpg', 'duration': 20}, {'file_name': 'har_page_009.jpg', 'url': 'static/resurse/har_page_009.jpg', 'duration': 20}, {'file_name': 'har_page_010.jpg', 'url': 'static/resurse/har_page_010.jpg', 'duration': 20}], 'version': 4}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Playing media: har_page_001.jpg from static/resurse/har_page_001.jpg
2025-08-05 13:53:08 - STARTED: har_page_001.jpg
[INFO] [SignageApp] Playing media: har_page_002.jpg from static/resurse/har_page_002.jpg
2025-08-05 13:53:15 - STARTED: har_page_002.jpg
[INFO] [SignageApp] Playing media: har_page_003.jpg from static/resurse/har_page_003.jpg
2025-08-05 13:53:17 - STARTED: har_page_003.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] Server playlist found with 2 items, version 5
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: Successfully downloaded 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Successfully downloaded wp2782770-1846651530.jpg to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 2 items from server
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 13:55:59 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from static/resurse/wp2782770-1846651530.jpg
2025-08-05 13:56:19 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] Server playlist found with 2 items, version 5
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: File 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File wp2782770-1846651530.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 2 items from server
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 14:03:41 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:04:01 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] Server playlist found with 2 items, version 5
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: File 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File wp2782770-1846651530.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 2 items from server
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 14:09:20 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:09:40 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 14:09:56 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:10:16 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 14:10:32 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:10:52 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 14:11:09 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:11:29 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 14:11:45 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:12:05 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] Server playlist found with 3 items, version 5
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: File 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File wp2782770-1846651530.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: Successfully downloaded SampleVideo_1280x720_1mb.mp4 to /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 3 items from server
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 14:24:44 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:25:04 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 14:25:20 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 14:25:25 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:25:46 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 14:26:02 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 14:26:07 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] Server playlist found with 3 items, version 5
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: File 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File wp2782770-1846651530.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File SampleVideo_1280x720_1mb.mp4 already exists. Skipping download.
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 3 items from server
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 14:40:29 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:40:50 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 14:41:06 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 14:41:27 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:41:47 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 14:42:03 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 14:42:25 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:42:45 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 14:43:01 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 14:43:21 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:43:42 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 14:43:58 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 14:44:18 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 14:44:38 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 14:44:54 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 14:45:15 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] Server playlist found with 3 items, version 5
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: File 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File wp2782770-1846651530.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File SampleVideo_1280x720_1mb.mp4 already exists. Skipping download.
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 3 items from server
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 15:13:11 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 15:13:31 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 15:13:47 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
2025-08-05 15:14:08 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] No playlist updates available
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] Server playlist found with 3 items, version 5
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: File 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File wp2782770-1846651530.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File SampleVideo_1280x720_1mb.mp4 already exists. Skipping download.
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 3 items from server
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 15:34:34 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[INFO] [SignageApp] Server response: {'hashed_quickconnect': '$2b$12$ReP1AQ/YknPWyoFLGwSgH.80kBv.Bm13XdRUTALyA6vD20T1vEOl.', 'playlist': [{'duration': 20, 'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'http://192.168.1.245:5000/media/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg'}, {'duration': 15, 'file_name': 'wp2782770-1846651530.jpg', 'url': 'http://192.168.1.245:5000/media/wp2782770-1846651530.jpg'}, {'duration': 5, 'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'http://192.168.1.245:5000/media/SampleVideo_1280x720_1mb.mp4'}], 'playlist_version': 5}
[INFO] [SignageApp] Fetched updated playlist from server.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] Server playlist found with 3 items, version 5
[INFO] [SignageApp] python_functions: Starting media file download...
[INFO] [SignageApp] python_functions: File 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File wp2782770-1846651530.jpg already exists. Skipping download.
[INFO] [SignageApp] python_functions: File SampleVideo_1280x720_1mb.mp4 already exists. Skipping download.
[INFO] [SignageApp] python_functions: Starting save_local_playlist function.
[INFO] [SignageApp] python_functions: Updated local playlist with server data.
[INFO] [SignageApp] python_functions: Finished save_local_playlist function.
[INFO] [SignageApp] python_functions: Finished media file download and updated local playlist.
[INFO] [SignageApp] python_functions: Updated playlist version in app_config.txt to 5.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Successfully loaded 3 items from server
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 15:35:55 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.245', port=5000): Max retries exceeded with url: /api/playlists?hostname=tv-holba1&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xd5a49e50>: Failed to establish a new connection: [Errno 111] Connection refused'))
[WARNING] [SignageApp] Server returned empty playlist
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Loaded existing local playlist with 3 items
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 15:58:32 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Found fallback playlist with 3 items
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Attempting to connect to server...
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.245', port=5000): Max retries exceeded with url: /api/playlists?hostname=tv-holba1&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xd570bd50>: Failed to establish a new connection: [Errno 111] Connection refused'))
[WARNING] [SignageApp] Server returned empty playlist, falling back to local playlist
[INFO] [SignageApp] Loaded fallback playlist with 3 items
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 16:04:48 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 16:05:08 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 16:05:24 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Found fallback playlist with 3 items
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Attempting to connect to server...
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.245', port=5000): Max retries exceeded with url: /api/playlists?hostname=tv-holba1&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xd5ded810>: Failed to establish a new connection: [Errno 111] Connection refused'))
[WARNING] [SignageApp] Server returned empty playlist, falling back to local playlist
[INFO] [SignageApp] Loaded fallback playlist with 3 items
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 16:15:53 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 16:16:14 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: SampleVideo_1280x720_1mb.mp4 from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/SampleVideo_1280x720_1mb.mp4
2025-08-05 16:16:30 - STARTED: SampleVideo_1280x720_1mb.mp4
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Found fallback playlist with 3 items
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Attempting to connect to server...
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.245', port=5000): Max retries exceeded with url: /api/playlists?hostname=tv-holba1&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xd60ccb10>: Failed to establish a new connection: [Errno 111] Connection refused'))
[WARNING] [SignageApp] Server returned empty playlist, falling back to local playlist
[INFO] [SignageApp] Loaded fallback playlist with 3 items
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 16:28:45 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Found fallback playlist with 3 items
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Attempting to connect to server...
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.245', port=5000): Max retries exceeded with url: /api/playlists?hostname=tv-holba1&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xcb3c1230>: Failed to establish a new connection: [Errno 111] Connection refused'))
[WARNING] [SignageApp] Server returned empty playlist, falling back to local playlist
[INFO] [SignageApp] Loaded fallback playlist with 3 items
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 16:34:00 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] Loading configuration in settings window
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Config loaded: {'screen_orientation': 'Landscape', 'screen_name': 'tv-holba1', 'quickconnect_key': '8887779', 'server_ip': '192.168.1.245', 'port': '5000', 'screen_w': '1920', 'screen_h': '1080', 'playlist_version': 5}
[INFO] [SignageApp] Configuration values loaded successfully in settings
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Playing media: wp2782770-1846651530.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/wp2782770-1846651530.jpg
2025-08-05 16:34:20 - STARTED: wp2782770-1846651530.jpg
[INFO] [SignageApp] Application exit requested
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Configuration loaded: server=192.168.1.245, host=tv-holba1, quick=8887779, port=5000
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] python_functions: Starting load_local_playlist function.
[INFO] [SignageApp] python_functions: Local playlist loaded: {'playlist': [{'file_name': '1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'url': 'static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg', 'duration': 20}, {'file_name': 'wp2782770-1846651530.jpg', 'url': 'static/resurse/wp2782770-1846651530.jpg', 'duration': 15}, {'file_name': 'SampleVideo_1280x720_1mb.mp4', 'url': 'static/resurse/SampleVideo_1280x720_1mb.mp4', 'duration': 5}], 'version': 5}
[INFO] [SignageApp] python_functions: Finished load_local_playlist function successfully.
[INFO] [SignageApp] Found fallback playlist with 3 items
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Initializing with settings: server=192.168.1.245, host=tv-holba1, port=5000
[INFO] [SignageApp] Attempting to connect to server...
[INFO] [SignageApp] Fetching playlist from URL: http://192.168.1.245:5000/api/playlists with params: {'hostname': 'tv-holba1', 'quickconnect_code': '8887779'}
[ERROR] [SignageApp] Failed to fetch playlist: HTTPConnectionPool(host='192.168.1.245', port=5000): Max retries exceeded with url: /api/playlists?hostname=tv-holba1&quickconnect_code=8887779 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xcb6c2270>: Failed to establish a new connection: [Errno 111] Connection refused'))
[WARNING] [SignageApp] Server returned empty playlist, falling back to local playlist
[INFO] [SignageApp] Loaded fallback playlist with 3 items
[INFO] [SignageApp] Playing media: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg from /home/pi/Desktop/signage-player/tkinter_app/src/static/resurse/1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
2025-08-05 16:44:37 - STARTED: 1307306470-nature_wallpaper_hd_hd_nature_3-3828209637.jpg
[INFO] [SignageApp] Starting Simple Tkinter Media Player
[INFO] [SignageApp] python_functions: Starting load_config function.
[INFO] [SignageApp] python_functions: Configuration file loaded successfully.
[INFO] [SignageApp] Application exit requested

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -2,7 +2,8 @@ import logging
import os
# Path to the log file
LOG_FILE_PATH = os.path.join(os.path.dirname(__file__), 'Resurse', 'log.txt')
# Update the path to point to the new resources directory
LOG_FILE_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'resources', 'log.txt')
# Create a logger instance
Logger = logging.getLogger('SignageApp')

20
tkinter_app/src/main.py Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3
"""
Main entry point for the tkinter-based signage player application.
This file acts as the main executable for launching the tkinter player.
"""
import os
import sys
import cv2 # Import OpenCV to confirm it's available
# Add the current directory to the path so we can import our modules
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
# Import the player module
from tkinter_simple_player import SimpleMediaPlayerApp
if __name__ == "__main__":
print(f"Using OpenCV version: {cv2.__version__}")
# Create and run the player
player = SimpleMediaPlayerApp()
player.run()

View File

@@ -5,8 +5,9 @@ from logging_config import Logger # Import the shared logger
import bcrypt
import time
CONFIG_FILE = './Resurse/app_config.txt'
LOCAL_PLAYLIST_FILE = './static/local_playlist.json' # Path to the local playlist file
# Update paths to use the new directory structure
CONFIG_FILE = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'resources', 'app_config.txt')
LOCAL_PLAYLIST_FILE = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'resources', 'local_playlist.json')
def load_config():
"""Load configuration from app_config.txt."""

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 KiB

File diff suppressed because it is too large Load Diff

14
tkinter_requirements.txt Normal file
View File

@@ -0,0 +1,14 @@
# Tkinter Media Player Requirements - Raspberry Pi Compatible
# Core GUI and media handling (lighter alternatives)
opencv-python-headless>=4.8.0
Pillow>=9.0.0
pygame>=2.1.0
# Networking and data handling
requests>=2.28.0
# System utilities for Python 3.9+
# pathlib2 not needed on modern Python versions
# Optional: Basic image processing without heavy dependencies
# numpy - will be installed with opencv-python-headless

View File

@@ -0,0 +1,7 @@
# Minimal Tkinter Media Player Requirements - Raspberry Pi Compatible
# Core dependencies only
requests>=2.28.0
# Optional but recommended if available via apt
# python3-pil (install via apt instead of pip)
# python3-tk (should already be installed with Python)