Spaces:
Sleeping
Sleeping
Nikita Makarov commited on
Commit ·
43fce10
1
Parent(s): 72cf384
Fix voice search: use Modal proxy first in search_by_request
Browse files
src/mcp_servers/music_server.py
CHANGED
|
@@ -668,8 +668,11 @@ class MusicMCPServer:
|
|
| 668 |
|
| 669 |
print(f"🔍 Searching for music: '{query}'")
|
| 670 |
|
| 671 |
-
# Try
|
| 672 |
-
tracks = self.
|
|
|
|
|
|
|
|
|
|
| 673 |
|
| 674 |
if tracks:
|
| 675 |
# Preserve custom genre in track metadata
|
|
|
|
| 668 |
|
| 669 |
print(f"🔍 Searching for music: '{query}'")
|
| 670 |
|
| 671 |
+
# Try Modal proxy first (works in restricted networks like HF Spaces)
|
| 672 |
+
tracks = self.search_youtube_via_modal_proxy(query, limit=1)
|
| 673 |
+
if not tracks:
|
| 674 |
+
# Fallback to direct YouTube search (won't work in HF Spaces but kept for local testing)
|
| 675 |
+
tracks = self.search_youtube_music(query, limit=1, fast=True)
|
| 676 |
|
| 677 |
if tracks:
|
| 678 |
# Preserve custom genre in track metadata
|