Compare commits
3 commits
9129b9ad54
...
1b141f57eb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b141f57eb | ||
|
|
0ceb3f5838 | ||
|
|
18788221c6 |
3 changed files with 6 additions and 6 deletions
|
|
@ -626,7 +626,7 @@ async def stream_audio(id: str):
|
|||
try:
|
||||
# Check Cache for stream URL
|
||||
# Check Cache for stream URL
|
||||
cache_key = f"v8:stream:{id}" # v8 cache key - deep debug mode
|
||||
cache_key = f"v9:stream:{id}" # v9 cache key - tv_embedded auth bypass
|
||||
cached_data = cache.get(cache_key)
|
||||
|
||||
stream_url = None
|
||||
|
|
@ -644,7 +644,7 @@ async def stream_audio(id: str):
|
|||
print(f"DEBUG: Fetching new stream URL for '{id}'")
|
||||
url = f"https://www.youtube.com/watch?v={id}"
|
||||
ydl_opts = {
|
||||
# Try standard bestaudio but prefer m4a. Removed protocol constraint to see what we actually get.
|
||||
# Use tv_embedded client which often bypasses sign-in requirements
|
||||
'format': 'bestaudio[ext=m4a]/bestaudio/best',
|
||||
'quiet': True,
|
||||
'noplaylist': True,
|
||||
|
|
@ -653,7 +653,8 @@ async def stream_audio(id: str):
|
|||
'socket_timeout': 30,
|
||||
'retries': 3,
|
||||
'force_ipv4': True,
|
||||
'extractor_args': {'youtube': {'player_client': ['ios', 'android', 'web']}},
|
||||
# tv_embedded is an embedded player client that usually doesn't require auth
|
||||
'extractor_args': {'youtube': {'player_client': ['tv_embedded', 'mediaconnect']}},
|
||||
}
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
```python
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from contextlib import asynccontextmanager
|
||||
from backend.api import routes
|
||||
from backend.api.routes import router as api_router
|
||||
from backend.scheduler import start_scheduler
|
||||
import os
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ uvicorn==0.34.0
|
|||
spotdl
|
||||
pydantic==2.10.4
|
||||
python-multipart==0.0.20
|
||||
APScheduler==0.0.20
|
||||
APScheduler>=3.10
|
||||
requests==2.32.3
|
||||
yt-dlp==2024.12.23
|
||||
ytmusicapi==1.9.1
|
||||
|
|
|
|||
Loading…
Reference in a new issue