import sample_manager

print('Iniciando escaneo de la libreria de samples con analyze_audio=True...')
try:
    path = r'C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\AbletonMCP_AI\librerias\organized_samples'
    stats = sample_manager.scan_samples(path, analyze_audio=True)
    p = stats.get('processed', 0)
    a = stats.get('added', 0)
    u = stats.get('updated', 0)
    e = stats.get('errors', 0)
    print(f'Procesados: {p}')
    print(f'Agregados: {a}')
    print(f'Actualizados: {u}')
    print(f'Errores: {e}')
except Exception as e:
    print('Error:', e)
