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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user