Refactor sound and extraction services to include user and timestamp fields
- Updated ExtractionInfo to include user_id, created_at, and updated_at fields. - Modified ExtractionService to return user and timestamp information in extraction responses. - Enhanced sound serialization in PlayerState to include extraction URL if available. - Adjusted PlaylistRepository to load sound extractions when retrieving playlist sounds. - Added tests for new fields in extraction and sound endpoints, ensuring proper response structure. - Created new test file endpoints for sound downloads and thumbnail retrievals, including success and error cases. - Refactored various test cases for consistency and clarity, ensuring proper mocking and assertions.
This commit is contained in:
@@ -17,7 +17,6 @@ from app.services.vlc_player import VLCPlayerService, get_vlc_player_service
|
||||
router = APIRouter(prefix="/sounds", tags=["sounds"])
|
||||
|
||||
|
||||
|
||||
def get_vlc_player() -> VLCPlayerService:
|
||||
"""Get the VLC player service."""
|
||||
return get_vlc_player_service(get_session_factory())
|
||||
@@ -56,7 +55,6 @@ async def get_sounds(
|
||||
return {"sounds": sounds}
|
||||
|
||||
|
||||
|
||||
# VLC PLAYER
|
||||
@router.post("/play/{sound_id}")
|
||||
async def play_sound_with_vlc(
|
||||
|
||||
Reference in New Issue
Block a user