- Replace email with username for authentication - Update User model, schemas, and auth endpoints - Update frontend login and register views - Add migration to remove email column - Add multiple track upload support - New backend endpoint for bulk upload - Frontend multi-file selection with progress - Auto-extract metadata from ID3 tags - Visual upload progress for each file - Prevent duplicate tracks in room queue - Backend validation for duplicates - Visual indication of tracks already in queue - Error handling with user feedback - Add bulk track selection for rooms - Multi-select mode with checkboxes - Bulk add endpoint with duplicate filtering - Selection counter and controls - Add track filters in room modal - Search by title and artist - Filter by "My tracks" - Filter by "Not in queue" - Live filtering with result counter - Improve Makefile - Add build-backend and build-frontend commands - Add rebuild-backend and rebuild-frontend commands - Add rebuild-clean variants - Update migrations to run in Docker 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
52 lines
1.0 KiB
Python
52 lines
1.0 KiB
Python
from pydantic import BaseModel
|
|
from uuid import UUID
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
from .user import UserResponse
|
|
from .track import TrackResponse
|
|
|
|
|
|
class RoomCreate(BaseModel):
|
|
name: str
|
|
|
|
|
|
class RoomResponse(BaseModel):
|
|
id: UUID
|
|
name: str
|
|
owner_id: UUID
|
|
current_track_id: Optional[UUID] = None
|
|
playback_position: int
|
|
is_playing: bool
|
|
created_at: datetime
|
|
participants_count: int = 0
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class RoomDetailResponse(BaseModel):
|
|
id: UUID
|
|
name: str
|
|
owner: UserResponse
|
|
current_track: Optional[TrackResponse] = None
|
|
playback_position: int
|
|
is_playing: bool
|
|
created_at: datetime
|
|
participants: list[UserResponse] = []
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class PlayerAction(BaseModel):
|
|
action: str # play, pause, seek, next, prev
|
|
position: Optional[int] = None # for seek
|
|
|
|
|
|
class QueueAdd(BaseModel):
|
|
track_id: UUID
|
|
|
|
|
|
class QueueAddMultiple(BaseModel):
|
|
track_ids: list[UUID]
|