Commit Graph

79 Commits

Author SHA1 Message Date
Matthieu B
7803cfd74c Keep invite form open on errors
Keep form-based invitation screens open on account creation failures so users can see errors without replaying the welcome animation.

Centralize join form template context, preserve theming across invite routes, and add regression coverage for validation and E2E flows.
2026-07-05 18:53:49 +02:00
Danni Croax
8e680388dd fix: handle multi-plex oauth invites 2026-06-06 12:40:31 +00:00
Matthieu B
4847133026 fix: restore get_recent_items parameter names broken by linting pass
Commit 73c29458f renamed library_id/limit to _library_id/_limit to
suppress ARG002 warnings, but the widget caller passes them as keyword
arguments (limit=6), causing a silent TypeError that returns empty data.

Closes #1207
2026-04-01 22:29:39 +02:00
Matthieu B
14df208566 Merge pull request #1201 from wizarrrr/fix/1168-plex-reinvite-update
fix: update existing Plex share on re-invite instead of failing
2026-03-29 16:25:43 +02:00
Matthieu B
73c29458fe fix: resolve all test failures, linting errors, and type errors
- Fix 55 test failures caused by missing request contexts and incorrect
  session_transaction() usage across 8 test files
- Fix ruff import sorting errors and unused imports
- Fix 122 type errors: rename method override parameters to match base
  classes, add None guards for fetchone()/datetime, widen dict type
  annotations, add type: ignore for SQLAlchemy stub limitations
- Add [tool.ty.rules] config to suppress unsupported-base warnings
- Fix _ variable shadowing gettext in wizard routes
- Add noqa: ARG002 for unused method arguments required by base class
2026-03-29 16:20:23 +02:00
Matthieu B
751bfb67dd fix: update existing Plex share on re-invite instead of failing (#1168)
When a user who already has a Plex share uses a new invite link, the
"already sharing" error from the Plex API is now handled gracefully by
calling update_user_libraries() and update_user_permissions() instead of
propagating the error to the end-user. The route layer also switches to
a generic, translatable user-facing error message backed by structlog for
admin-visible diagnostics.
2026-03-29 16:15:24 +02:00
Matthieu B
89762d96dd feat: add bundle preview functionality and improve token generation tests
- Added a preview link for bundles in the wizard settings page. closes #1048
- Enhanced the wizard steps template to handle bundle preview mode.
- Updated JavaScript to generate URLs for bundle preview and runtime modes.
- Improved test coverage for password reset token generation by asserting token creation.
2025-12-09 14:37:39 +01:00
Matthieu B
af6a74d6b8 fix: improve error message handling in extract_plex_error_message and use library names in _invite_user closes #975 2025-11-03 18:35:34 +01:00
Matthieu B
0050f4b646 feat: allow user edit 2025-11-03 14:36:04 +01:00
Matthieu B
3d97dda0fb fix: error in nwo playing cards 2025-10-23 20:10:04 +02:00
Matthieu B
6a3632ec66 refactor: update type hints for better clarity and consistency across multiple files 2025-10-23 19:49:58 +02:00
Matthieu B
9b5aa0972a refactor: remove slop from media and new linting rules 2025-10-23 18:33:50 +02:00
Matthieu B
03362b0617 fix: Update Plex avatar URL handling to use public URLs directly, removing the need for a proxy 2025-10-19 16:48:26 +02:00
Matthieu B
6ab5e024db Revert "Merge pull request #925 from wizarrrr/chore/python-3.14-upgrade"
This reverts commit 35dde7c19a, reversing
changes made to c8cf9905ba.
2025-10-19 14:05:59 +02:00
Matthieu B
36227c762b refactor: Update type hints for user details methods and other functions for improved clarity 2025-10-18 17:42:26 +02:00
engels74
d0df4c6d5d feat: wizard step refactor into pre/post wizard steps
Changes:
  - Pre/post invitation wizard phases
  - Phase-aware routing (/pre-wizard/*, /post-wizard/*)
  - Phase indicator badges (visual categorization)
  - Dynamic completion button behavior
  - Two-column admin layout with category drag-and-drop
  - Invite code management service
  - Enhanced wizard export/import
  - Comprehensive test coverage (17 new test files)
2025-10-16 15:28:48 +02:00
Mully
4996b1c8f3 fix: separate disable and enable
+ Much clearer separation of enable and disable (fixing the earlier terrible idea)

+ Audiobookshelf, jellyfin and romm now have enable user logic in the enable_user func
2025-10-10 10:45:40 -04:00
Mully
41125723b8 fix: linting errors 2025-10-10 10:15:12 -04:00
Mully
73e1e12629 feat: enable user endpoint
+ POST /users/<user_id>/enable added

+ Most service's enable_user implementation informs the user that enabling is not supported

+ Audiobookshelf, Jellyfin and RomM can now both disable and enable users

+ Since the few platforms that natively support disabling/enabling users use the same endpoints, disable_user has been given an optional boolean param called enable which defaults to false. This reduces the need of any working enable_user funcs to have a nearly identical implementation.
2025-10-10 10:00:17 -04:00
Matthieu B
e38a699d5e fix: enhance library access resolution for Plex users and update user details structure closes #892. Remove dev dependencies by default closes #905 2025-10-08 11:11:47 +02:00
Matthieu B
290b5f34d1 fix: implement image proxy token generation for now playing cards closes and fixes #891 2025-10-06 10:44:06 +02:00
Matthieu B
72f4c61055 feat: implement secure image proxy service with token-based access closes #886 2025-10-04 18:57:34 +02:00
Matthieu B
b682967ed2 feat: add notification events handling and UI updates for user notifications 2025-10-04 14:46:01 +02:00
Matthieu B
fc49da65f6 refactor: fix ruff linting and ty type errors
- Fix invalid parameter defaults: library_id: str | None = None
- Replace try-except-pass with contextlib.suppress()
- Remove unnecessary dict.keys() calls
- Remove unnecessary variable assignments before return
- Combine nested if statements
- Add type ignore comments for intentional shadowing
- Add type ignore comments for SQLAlchemy dynamic attributes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 22:06:15 +02:00
Matthieu B
f295a345a1 feat: add user disable functionality and update user management settings
- Introduced `is_disabled` attribute to the User model.
- Added `expiry_action` selection in the GeneralSettingsForm for user management.
- Implemented `disable_user` methods for various media clients (Audiobookshelf, Jellyfin, Kavita, etc.) to handle user disabling.
- Updated `check_expiring` task to process expired users based on the new settings.
- Enhanced user interface to reflect disabled status in user cards.
- Added migration for the new `is_disabled` column in the user table.
2025-09-27 12:19:48 +02:00
Matthieu B
3310c2133c feat: revamp user policy handling 2025-09-12 14:11:51 +02:00
Matthieu B
9257b3797b plex policy fix 2025-09-12 12:01:36 +02:00
Matthieu B
01fb8d0fc1 fix: optimise server endpoints 2025-09-11 00:29:10 +02:00
Matthieu B
3d61903f93 fix: SQLite database lock errors in media server user sync
- Replace raw SQL UPDATE statements with metadata caching system
- Add smart User model properties for allow_downloads/allow_live_tv
- Properties check server-specific keys (allowSync, EnableContentDownloading, etc.)
- Fix all media server clients: Plex, Jellyfin, Emby, AudiobookShelf, Navidrome, RomM, Kavita, Komga
- Remove problematic raw SQL from admin routes
- Eliminates concurrent transaction conflicts causing "database is locked" errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 14:26:28 +02:00
Matthieu B
6f28f7dbb0 feat: UI speedup 2025-09-09 22:12:17 +02:00
Matthieu B
c317e66fa8 fix: update API key hashing to use UTF-8 encoding and improve bundle name handling in export
fix: add requests.exceptions import in Audiobookrequest and Ombi clients
fix: ignore type errors in invitation unit tests for library and server associations
fix: use timezone-aware datetime for export dates in WizardExportImportService
2025-09-05 14:41:37 +02:00
Matthieu B
8875cfb066 fix: fix allow download / live tv icons 2025-09-05 12:53:48 +02:00
Matthieu B
d19500f510 feat: add Release Please automation with Conventional Commits
- Add Release Please GitHub Action workflow for automated releases
- Configure conventional commits with commitizen for local enforcement
- Update pyproject.toml version to current 2025.8.3
- Add release-please-config.json and manifest for version management
- Fix Ruff linting issues (exception chaining and unnecessary assignment)
- Update CLAUDE.md documentation with release automation workflow
- Maintain compatibility with existing release.yml Docker builds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-31 14:39:41 +02:00
Matthieu B
181c32ceb2 Use list_users for Plex user stats 2025-08-17 21:24:46 +01:00
Matthieu B
4de1def5b6 Refactor invitation handling to mark invitations as used and sync users from media server 2025-08-14 23:28:59 +02:00
Matthieu B
b6e54adbe0 Enhance invitation flow by marking invitations as used and syncing users in background threads 2025-08-14 18:13:11 +02:00
Matthieu B
77438762e1 fix plex dual server 2025-08-14 15:01:13 +02:00
Matthieu B
b83a25c49a Enhance user management by adding invitation date sorting and display in user tables 2025-08-13 14:14:17 +02:00
Matthieu B
a25fb81721 Refactor user join methods to improve notification handling and enforce implementation in subclasses 2025-08-13 13:34:23 +02:00
Matthieu B
9ab4a199ad Add user expiry management features and enhance user interface for expiring and expired users fixes #755 2025-08-13 12:26:58 +02:00
Matthieu B
a94eb1ee57 fixes #760 2025-08-12 18:49:09 +02:00
Matthieu B
d4dd57ee1e feat: Add comprehensive connections and expiry management system
- Add new connections management system with MediaConnection and DiscordWebhook models
- Implement dynamic server configuration with URL field support
- Add expiry management system with automatic user cleanup
- Create wizard preset system for streamlined server setup
- Add dedicated connections interface in settings with CRUD operations
- Integrate expiry functionality with connection management
- Add proper form validation and error handling
- Update templates and routes for new connection workflow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 22:21:10 +02:00
Matthieu B
d57ea4e359 feat: Introduce standardized user details handling across media clients
- Added `MediaUserDetails` and `UserLibraryAccess` data classes for consistent user information representation.
- Implemented `get_user_details` method in various media clients (Emby, Jellyfin, Kavita, Komga, Plex, Romm) to return standardized user details.
- Updated `get_user` methods in media clients to maintain backward compatibility while leveraging the new user details structure.
- Enhanced user listing and synchronization processes to include policy attributes and library access information.
- Improved user interface templates to display user policies and account information more effectively.
- Added human-readable date formatting for expiration and creation dates in user-related templates.
2025-07-25 16:37:32 +02:00
Matthieu B
3b3d8e216d refactor: update limiter configuration to disable default limits and improve clarity
feat: enhance poster URL handling in PlexClient for better image accessibility
2025-07-24 18:43:42 +02:00
Matthieu B
3907cfefe5 feat: add cinema poster fetching functionality for enhanced user experience 2025-07-24 18:29:25 +02:00
DesignGears
3183ec4186 style: fix formatting and add missing comma in limiter config
Fix inconsistent formatting in PlexClient transcode check by splitting condition into multiple lines
Add missing trailing comma in limiter configuration for better readability and maintainability
2025-07-20 19:41:46 -06:00
DesignGears
2bb6abc7d5 fix(plex): improve transcoding detection logic
Use more reliable methods to detect active transcoding sessions by checking video/audio decision attributes. Fall back to transcodeSessions list if primary method fails.
2025-07-19 10:52:59 -06:00
Matthieu B
c7fab7cb2b Add debug logging for user folder settings in Emby, Jellyfin, and Plex clients 2025-07-18 14:30:52 +02:00
Matthieu B
d8cb5193c3 invitation workflow overall for more stability 2025-07-17 15:13:00 +02:00
Matthieu B
02126de7b8 Add ty dependency and pre-push hook for type checking
- Added `ty` version 0.0.1a14 to dependencies in `pyproject.toml`.
- Updated `.pre-commit-config.yaml` to include a pre-push hook for type checking using `ty`.
- Made minor adjustments in various files to ensure compatibility with type checking.
2025-07-15 21:32:43 +02:00