Fix player freezing and rapid cycling issues

- Switch from VLC to PIL for image display to avoid VLC display errors
- Add transition protection to prevent rapid media cycling
- Remove conflicting next_media_loop calls
- Improve error handling and logging for better debugging
- Fix VLC configuration for better Raspberry Pi compatibility
This commit is contained in:
2025-09-04 15:52:13 +03:00
parent 2a564f5e84
commit d2a996feb9
5 changed files with 584 additions and 11 deletions

View File

@@ -54,9 +54,12 @@ def main():
def reload_playlist_if_updated():
new_playlist = load_latest_playlist()
if new_playlist != player.playlist:
print("[MAIN] Playlist updated, reloading...")
player.playlist = new_playlist
player.current_index = 0
player.show_current_media()
# Only restart if we're not already in a transition
if not hasattr(player, 'is_transitioning') or not player.is_transitioning:
player.show_current_media()
root.after(10000, reload_playlist_if_updated)
reload_playlist_if_updated()