updated feedback

This commit is contained in:
2025-09-08 15:19:47 +03:00
parent e2eecb9cf9
commit 5063b47a56
9 changed files with 463 additions and 30 deletions

View File

@@ -6,7 +6,11 @@ import json
# Add the signage_player directory to path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'signage_player'))
from get_playlists import send_playlist_check_feedback
from get_playlists import (
send_playlist_check_feedback,
send_playlist_restart_feedback,
send_playing_status_feedback
)
def load_config():
config_path = os.path.join(os.path.dirname(__file__), 'signage_player', 'main_data', 'app_config.txt')
@@ -14,10 +18,29 @@ def load_config():
return json.load(f)
def test_feedback():
print("Testing feedback system...")
print("=== Testing Complete Feedback System ===")
config = load_config()
result = send_playlist_check_feedback(config, 5)
print(f"Feedback test result: {result}")
print("\n1. Server Interrogation Feedback:")
result1 = send_playlist_check_feedback(config, 6)
print(f" Result: {'✓ Success' if result1 else '❌ Failed'}")
print("\n2. Playlist Starting Feedback:")
result2 = send_playing_status_feedback(config, 6, "intro1.mp4")
print(f" Result: {'✓ Success' if result2 else '❌ Failed'}")
print("\n3. Playlist Working in Loop Feedback:")
result3 = send_playlist_restart_feedback(config, 6)
print(f" Result: {'✓ Success' if result3 else '❌ Failed'}")
success_count = sum([result1, result2, result3])
print(f"\n=== Complete Feedback Coverage ===")
print("✓ Server interrogation - when checking for new playlist")
print("✓ Playlist starting - when first media begins")
print("✓ Playlist working in loop - when playlist cycles complete")
print("✓ Error reporting - when issues occur")
print(f"\nResults: {success_count}/3 successful")
if __name__ == "__main__":
test_feedback()