12 Commits

Author SHA1 Message Date
Beda Schmid
ff853b1754 Add per-user auto-approve toggle for artist additions 2026-03-03 08:59:00 -03:00
angelsomething
264652556a Add OIDC SSO integration with login flow
- Add authlib for OAuth/OIDC support
- Implement OIDC login/callback routes with group-based admin sync
- Support OIDC_ONLY mode to disable password authentication
- Add logged_out page for post-logout flow
- Show OIDC/Local auth type badge in user management
- Add user edit modal with OIDC sync warning
- Fix script.js null guards for non-main pages
- Hide password change section for OIDC users in profile
- Add ProxyFix middleware for reverse proxy deployments
2026-01-19 20:29:45 +00:00
Beda Schmid
9bb1f90a52 Add DB migration
Adds DB migration to listenbrainz support.
2025-10-13 17:12:09 -03:00
Beda Schmid
13cdf87d30 Prevents orphaned requests on user delete
### Fixed
- Prevents foreign key constraint failures when removing users.
- Ensures approved requests remain accessible by nullifying the approver reference instead of blocking deletion.
2025-10-11 12:17:28 -03:00
Beda Schmid
5aa1d9205e Make migration idempotent
### Added
- Adds runtime checks to detect existing tables and indexes before creating them.
2025-10-11 10:39:35 -03:00
Beda Schmid
9b08dde6c7 Adds artist request workflow
### Added
- Persistent artist request model and migration for tracking user requests.
- Admin interface for reviewing, approving, and rejecting pending requests.
- Socket endpoint for users to submit artist requests from the UI.
- Client-side request button and user-info emission so the UI can show request vs add actions.
- Server-side handler to create requests, emit toast notifications, and update the UI.

### Changed
- Button behavior now shows "Request" for non-admins and preserves add-to-service action for admins.
- Session state includes an admin flag and is sent to clients on connection.
- Approving a request now triggers adding the artist to the external content service and marks the request approved.
2025-10-11 10:29:51 -03:00
Beda Schmid
b9f678158a Ensure installs without alembic don't explode
Ensures installs without alembic do not crash
2025-10-10 14:09:48 -03:00
Beda Schmid
efb18d38f9 Remove entire Listenbrainz Integration
Removes LB integration, since it is not useful.
2025-10-10 13:39:10 -03:00
Beda Schmid
351a2797cb Removes Last.fm session key support
### Changed
- Rely on public Last.fm usernames for personal recommendations; the recommendation API endpoint was deprecated long ago
- Remove UI and client-side logic that showed or managed a "linked" session key; data handling no longer reads or exposes a linked session-key state.

### Deprecated
- Preserve migration chain with an explicit no-op migration after removing the session-key column from the schema.

### Removed
- Database column and model field for Last.fm session key.
- Server endpoints and UI flows for linking/authorizing via session tokens and session-based storage of link tokens.

### Fixed
- Prevents errors and unnecessary auth flows when fetching personal recommendations without user credentials.
2025-10-10 12:05:02 -03:00
Beda Schmid
95911d94e7 Adds Last.fm account linking
### Added
- Persistent per-user Last.fm session key column.
- Link and completion endpoints plus UI controls to authorize and unlink accounts.
- A user-focused Last.fm service that supports authenticated requests and richer recommendation aggregation.
- Frontend indicators to show linked status and guide the linking flow.

### Changed
- Use stored session key when fetching personal recommendations and expose a linked flag to the UI.
- Prefer direct user recommendations when available, otherwise aggregate similar artists from top artists.
- Ensure the user's remote library cache is populated synchronously so owned artists are filtered reliably.
- Emit an acknowledgment and update sidebar state when personal discovery yields no seeds.
- Clear stored session key when a user unlinks their account.

### Removed
- Legacy simple recommendation implementation replaced by the new user-centric integration.

### Fixed
- Prevent spinner from hanging when there are no seeds by sending an ACK and stopping the run.
- Surface link token state and completion control in the profile flow so users can finish linking.
2025-10-10 09:23:56 -03:00
Beda Schmid
ccaa6af58e Migration without manual interaction | 3
This is an attempt at fixing migration as in not requiring user to manually run the update
2025-10-10 06:57:43 -03:00
Beda Schmid
569cddfddc Adds personal listening discovery
### Added
- Personal discovery support for Last.fm and ListenBrainz to fetch user-specific top/recommended artists.
- Profile fields for Last.fm username, ListenBrainz username and user token, with UI controls to add or remove the token.
- Sidebar controls, spinners and socket events to initiate and stream personal recommendations.
- Database migration adding user columns for listening service integration.

### Changed
- Recommendation flow now streams seed artists, deduplicates against the user's library, and presents missing/skip feedback.
- Session and socket logic extended to emit per-user service availability and detailed error/ack responses.
- Service initialization wires up Last.fm and ListenBrainz clients and broadcasts availability state to connected sessions.

### Fixed
- Ensures personal discovery state and UI refresh after profile updates and when opening the sidebar so availability is accurate.

### Security
- ListenBrainz token handling added with an option to clear the stored token; token input is treated as a secret in the UI.
2025-10-09 18:07:46 -03:00