| import sys | |
| import os | |
| import asyncio | |
| # Ensure we can import from 'app' | |
| sys.path.append(os.getcwd()) | |
| from app.services.supabase_client import get_supabase_service | |
| async def check(): | |
| supabase = get_supabase_service() | |
| # Search for video with title containing 'defence' | |
| videos = await supabase.select("videos", filters={}) | |
| for v in videos: | |
| if "defence" in v.get("title", "").lower(): | |
| print(f"ID: {v.get('id')}") | |
| print(f"Title: {v.get('title')}") | |
| print(f"Status: {v.get('status')}") | |
| print(f"Annotated URL: {v.get('annotated_url')}") | |
| print(f"Storage Path: {v.get('storage_path')}") | |
| # Check analysis results | |
| results = await supabase.select("analysis_results", filters={"video_id": v.get("id")}) | |
| if results: | |
| r = results[0] | |
| print(f"Analysis Status: completed") | |
| print(f"Total Frames: {r.get('total_frames')}") | |
| print(f"Players Detected: {r.get('players_detected')}") | |
| print(f"Total Passes: {r.get('total_passes')}") | |
| print(f"Interceptions: {r.get('total_interceptions')}") | |
| print(f"Shot Attempts: {r.get('shot_attempts')}") | |
| else: | |
| print("Analysis Results: None found") | |
| print("-" * 20) | |
| if __name__ == "__main__": | |
| asyncio.run(check()) | |