Updated SH file

This commit is contained in:
2025-06-20 08:31:14 +03:00
parent 8052b564b2
commit 5e4890aeab
6 changed files with 67 additions and 69 deletions

View File

@@ -11,3 +11,5 @@
2025-06-19 16:06:03 - STARTED: IMG-20250602-WA0011.jpg
2025-06-19 16:06:23 - STARTED: IMG_20250601_192845.jpg
2025-06-19 16:06:43 - STARTED: IMG_20250601_185017.jpg
2025-06-19 16:39:23 - STARTED: IMG-20250526-WA0003.jpg
2025-06-19 16:39:23 - STARTED: IMG-20250602-WA0011.jpg

View File

@@ -49,6 +49,12 @@ Logger.info(f"python_functions: Configuration status: {config_status}")
def load_playlist():
"""Load playlist from the server or local storage."""
# Check if the local playlist exists and is valid
local_playlist = load_local_playlist()
if local_playlist:
Logger.info("python_functions: Using local playlist.")
return local_playlist # Skip server download if local playlist is valid
try:
Logger.info("python_functions: Attempting to load playlist from server...")
server_ip = f'{server}:{port}' # Construct the server IP with port
@@ -91,7 +97,7 @@ def load_playlist():
Logger.error(f"python_functions: Failed to load playlist: {e}")
# Fallback to local playlist
return load_local_playlist()
return local_playlist
def load_local_playlist():