#!/usr/bin/env python3
"""
Test script for improved title cleaning
"""

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

from src.api.database import MusicBrainzDatabase

def test_title_cleaning():
    db = MusicBrainzDatabase()
    
    # Test cases from the failed songs
    test_titles = [
        "Do I Wanna Know? - Live At the BBC",
        "All The Small Things (John Lewis Christmas Ad 2022)",
        "I Don t F  k With You",
        "Por Mujeres Como Tu",
        "Thought You Should Know (Without Backing Vocals)",
        "It Might Be You (from the movie Tootsie)",
        "Speedy Gonzales (Boone & Speedy Vocals)",
        "I'm Telling You Now (Two Semitones Down)",
        "The ELO Medley 1",
        "Can't Fight This Feeling (Minus Piano)",
        "The Look Of Love",
        "Revolution (Without Backing Vocals)",
        "Right Here, Right Now (My Heart Belongs to You)",
        "Hush Hush",
        "On The Floor",
        "(I've Had) The Time Of My Life",
    ]
    
    print("🔍 Testing Improved Title Cleaning")
    print("=" * 50)
    
    for title in test_titles:
        print(f"\n📝 Original: '{title}'")
        
        try:
            variations = db._generate_title_variations(title)
            print(f"  🧹 Cleaned variations ({len(variations)}):")
            for i, variation in enumerate(variations, 1):
                print(f"    {i}. '{variation}'")
                
        except Exception as e:
            print(f"  ❌ Error: {e}")

if __name__ == "__main__":
    test_title_cleaning() 