#!/usr/bin/env python3
"""
Debug script for individual artist searches
"""

import sys
sys.path.insert(0, '/app')

from src.api.database import MusicBrainzDatabase

def test_artist_search():
    db = MusicBrainzDatabase()
    
    # Test the main artists from the collaborations
    test_artists = [
        "Kanye",  # From "ft Jamie Foxx West, Kanye"
        "Kanye West",  # What it should be
        "Ariana Grande",  # From "Ariana Grande, Normani, Nicki Minaj"
        "SZA",  # From "SZA, Justin Bieber"
    ]
    
    print("🔍 Testing Individual Artist Searches")
    print("=" * 50)
    
    for artist_name in test_artists:
        print(f"\n📝 Searching for: '{artist_name}'")
        
        try:
            result = db.fuzzy_search_artist(artist_name)
            if result:
                matched_name, mbid, score = result
                print(f"  ✅ Found: '{matched_name}' (MBID: {mbid}, Score: {score})")
            else:
                print(f"  ❌ Not found")
                
        except Exception as e:
            print(f"  ❌ Error: {e}")

if __name__ == "__main__":
    test_artist_search() 