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

@@ -137,10 +137,10 @@ async def seek(
"""Seek to specific position in current track."""
try:
player = get_player_service()
await player.seek(request.position_ms)
return MessageResponse(message=f"Seeked to position {request.position_ms}ms")
await player.seek(request.position)
return MessageResponse(message=f"Seeked to position {request.position}ms")
except Exception as e:
logger.exception("Error seeking to position %s", request.position_ms)
logger.exception("Error seeking to position %s", request.position)
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail="Failed to seek",