Upload files to "kronic/resolver"

This commit is contained in:
2026-11-25 20:28:57 -06:00
parent 82e1c788ab
commit 928521dd7c
5 changed files with 1088 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
"""
Kronic resolver wrapper with SpotDL routes.
This intentionally imports the existing resolver app unchanged, then mounts
the SpotDL router on that same FastAPI application.
Run with:
python -m uvicorn kronic.resolver.app_spotdl:app --host 127.0.0.1 --port 3030
"""
from .app import app
from .spotdl_router import router as spotdl_router
def _has_spotdl_route() -> bool:
for route in getattr(
app,
"routes",
[],
):
if getattr(
route,
"path",
None,
) == "/api/music/spotify/resolve":
return True
return False
if not _has_spotdl_route():
app.include_router(
spotdl_router
)