Replace Dongrays with FreeMidi adapter
- BitMidi is blocked by Cloudflare on Vercel (403) - Dongrays domain is dead (ENOTFOUND) - Add FreeMidi adapter as primary search source - FreeMidi returns real MIDI files without blocking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
import type { SearchAdapter, MIDICandidate } from '../types.js';
|
||||
import { BitMidiAdapter } from '../adapters/BitMidiAdapter.js';
|
||||
import { DongraysAdapter } from '../adapters/DongraysAdapter.js';
|
||||
import { MockAdapter } from '../adapters/MockAdapter.js';
|
||||
import { FreeMidiAdapter } from '../adapters/FreeMidiAdapter.js';
|
||||
|
||||
export class MIDISearchService {
|
||||
private adapters: SearchAdapter[];
|
||||
|
||||
constructor() {
|
||||
// Real MIDI adapters only - no mock
|
||||
// FreeMidi first (more reliable), BitMidi as backup
|
||||
this.adapters = [
|
||||
new BitMidiAdapter(),
|
||||
new DongraysAdapter()
|
||||
new FreeMidiAdapter(),
|
||||
new BitMidiAdapter()
|
||||
];
|
||||
console.log('MIDISearchService initialized with real adapters:', this.adapters.map(a => a.name));
|
||||
console.log('MIDISearchService initialized with adapters:', this.adapters.map(a => a.name));
|
||||
}
|
||||
|
||||
async search(query: string): Promise<MIDICandidate[]> {
|
||||
|
||||
Reference in New Issue
Block a user