Skip to content

Conversation

@mtthidoteu
Copy link
Contributor

Implements comprehensive Drop media server integration following the media-server integration checklist:

Core Implementation

  • Create DropClient with RestApiMixin base class
  • Implement full user management API (CRUD operations)
  • Support Drop's two-step user creation (invitation → signup)
  • Bearer token authentication with System tokens
  • Proper error handling for missing Simple Authentication

Integration Points

  • Register client via @register_media_client decorator
  • Add connection checker with API validation
  • Wire into media_servers routes and forms
  • Update UI templates (create/edit server modals)

API Features

  • User listing and synchronization from Drop API
  • Statistics and server health monitoring
  • Invitation-based user creation workflow
  • Proper policy mapping (enabled, admin, displayName)

Error Handling

  • Clear messaging when Simple Authentication disabled
  • Token permission validation and logging
  • Graceful fallback for missing API endpoints

Drop integration ready for use once Simple Authentication is enabled on the Drop server.

mtthidoteu and others added 3 commits September 12, 2025 12:05
Implements comprehensive Drop media server integration following the
media-server integration checklist:

## Core Implementation
- Create DropClient with RestApiMixin base class
- Implement full user management API (CRUD operations)
- Support Drop's two-step user creation (invitation → signup)
- Bearer token authentication with System tokens
- Proper error handling for missing Simple Authentication

## Integration Points
- Register client via @register_media_client decorator
- Add connection checker with API validation
- Wire into media_servers routes and forms
- Update UI templates (create/edit server modals)

## API Features
- User listing and synchronization from Drop API
- Statistics and server health monitoring
- Invitation-based user creation workflow
- Proper policy mapping (enabled, admin, displayName)

## Error Handling
- Clear messaging when Simple Authentication disabled
- Token permission validation and logging
- Graceful fallback for missing API endpoints

Drop integration ready for use once Simple Authentication
is enabled on the Drop server.

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

Co-Authored-By: Claude <[email protected]>
- Add TYPE_CHECKING import for MediaUserDetails type hint
- Improve get_user_details return type annotation
- Update user policies mapping with standardized permission keys
- Fix admin property mapping in get_user_details
- Set library_access to None for Drop (indicates full access)

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

Co-Authored-By: Claude <[email protected]>
@mtthidoteu
Copy link
Contributor Author

@DecDuck I have most of the things ready. However I am getting a 404 on /api/v1/admin/invitation. I tried manually doing it:

➜  ~   curl -X POST http://192.168.10.5:3010/api/v1/admin/invitation \
>     -H "Authorization: Bearer {TOKEN HERE}" \
>     -H "Content-Type: application/json" \
>     -d '{
quote>       "expires": "2025-09-12T14:00:00.000Z",
quote>       "username": "testuser",
quote>       "email": "[email protected]", 
quote>       "isAdmin": false
quote>     }'
{
  "error": true,
  "url": "http://192.168.10.5:3010/api/v1/admin/invitation",
  "statusCode": 404,
  "statusMessage": "Page not found: /api/v1/admin/invitation",
  "message": "Page not found: /api/v1/admin/invitation",
  "data": {
    "path": "/api/v1/admin/invitation"
  }
}%    

as per https://developer.droposs.org/web/users#create-invitation

@mtthidoteu mtthidoteu mentioned this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants