Skip to content

feat: unify importer and scrobbler APIs under a single app#6

Open
tsshadow wants to merge 1 commit intomainfrom
codex/refactor-api-structure-and-update-docker-setup
Open

feat: unify importer and scrobbler APIs under a single app#6
tsshadow wants to merge 1 commit intomainfrom
codex/refactor-api-structure-and-update-docker-setup

Conversation

@tsshadow
Copy link
Owner

Summary

  • move the importer endpoints and websocket handlers into a dedicated APIRouter module and reuse it across services
  • add a new unified FastAPI application that hosts the scrobbler routers alongside the importer API and lifecycle hooks
  • refresh Docker setup, entrypoints, and documentation to reference the combined backend service

Testing

  • not run (not requested)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +80 to +87
raise ValueError("updates must contain at least one entry")
return value


importer_router = APIRouter(prefix="/importer", tags=["importer"])


def ensure_yt_dlp_is_updated() -> None:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move importer API under new prefix without updating frontend defaults

The new router now mounts every importer endpoint and WebSocket under /importer (APIRouter(prefix="/importer")). The Svelte dashboard that ships in modules/importer/frontend still defaults VITE_API_BASE to /api and constructs the WebSocket URL as /ws/jobs, so a stock build will keep calling the old paths and receive 404s. Unless every deployment sets a custom VITE_API_BASE at build time, the importer UI can no longer reach the backend. Consider either exposing the routes under both prefixes for compatibility or updating the frontend defaults to /importer/api and /importer/ws/jobs in the same change.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant