refactor: Update player seek functionality to use consistent position field across schemas and services
All checks were successful
Backend CI / test (push) Successful in 4m5s

This commit is contained in:
JSC
2025-07-31 21:33:00 +02:00
parent 3405d817d5
commit e69098d633
5 changed files with 25 additions and 26 deletions

View File

@@ -10,7 +10,7 @@ from app.services.player import PlayerMode
class PlayerSeekRequest(BaseModel):
"""Request model for seek operation."""
position_ms: int = Field(ge=0, description="Position in milliseconds")
position: int = Field(ge=0, description="Position in milliseconds")
class PlayerVolumeRequest(BaseModel):
@@ -35,8 +35,8 @@ class PlayerStateResponse(BaseModel):
playlist: dict[str, Any] | None = Field(
None, description="Current playlist information"
)
position_ms: int = Field(description="Current position in milliseconds")
duration_ms: int | None = Field(
position: int = Field(description="Current position in milliseconds")
duration: int | None = Field(
None, description="Total duration in milliseconds",
)
volume: int = Field(description="Current volume (0-100)")