Fix NAS playback: Force IPv4 and use stable clients for yt-dlp

This commit is contained in:
Khoa Vo 2026-01-01 16:07:10 +07:00
parent 7a58c2357d
commit b75b6b1aa6

View file

@ -626,6 +626,8 @@ async def stream_audio(id: str):
'geo_bypass': True, # Bypass geo restrictions
'socket_timeout': 30, # Timeout for sockets
'retries': 3, # Retry on transient errors
'force_ipv4': True, # Force IPv4 (Fixes NAS/Docker IPv6 issues)
'extractor_args': {'youtube': {'player_client': ['ios', 'android', 'web']}}, # Use stable clients
}
# Extract direct URL