- 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
When server rows exist but have no per-server expiry, the global
invitation.expires was ignored, causing expired invitations to be
treated as valid.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The recent migration removed these fields from User model (correctly) but they
were accidentally removed from the Invitation model definition as well. These
fields are required on invitations to specify what permissions to grant when
creating users on media servers.
Fixes TypeError: 'allow_downloads' is an invalid keyword argument for Invitation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed library checkboxes to use unique library.id instead of library.external_id
- Updated backend to handle library IDs instead of external IDs
- Added visual grouping by server name when multiple servers are selected
- Added helper text to clarify that libraries are grouped by server
- Kept deduplication logic in backend as safety measure
This prevents the UNIQUE constraint violation that occurred when multiple
servers had libraries with the same external_id (e.g., "Audiobooks")
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add deduplication logic to prevent adding the same library ID multiple times
- This fixes the UNIQUE constraint violation error when multiple servers
have libraries with the same external_id
- Uses set to track seen library IDs and only adds unique ones
- Maintains backward compatibility with existing code
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Clear existing library associations before adding new ones to prevent
duplicate entries in the invite_library table
- This matches the existing logic for server associations and prevents
the sqlite3.IntegrityError that users were experiencing
- All tests passing, maintains backward compatibility
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add support for inviting users to multiple media servers simultaneously
- Implement Jellyfin-specific invite options (Allow Downloads, Allow Live TV)
- Add server type detection and conditional UI rendering in invite form
- Create new database migration for Jellyfin server options
- Update invite service to handle multi-server invitations
- Add server-specific validation and error handling
- Enhance user management with server-specific permissions
- Update templates to show server-specific invite options
- Add middleware support for multi-server authentication
- Improve settings forms with server type-specific fields
Breaking changes:
- Invite form now requires server selection
- User permissions are now server-specific
- Database schema updated for multi-server support
- Raise CODESIZE from 6 to 10 to make bruteforcing more difficult
- Increase maximum allowed digits for admin-supplied invite code to 12
- Formatting fixes