feat: add SoundRepository and SoundScannerService for audio file management

- Implemented SoundRepository for database operations related to sounds, including methods for retrieving, creating, updating, and deleting sound records.
- Developed SoundScannerService to scan directories for audio files, calculate their metadata, and synchronize with the database.
- Added support for various audio file formats and integrated ffmpeg for audio duration extraction.
- Created comprehensive tests for sound API endpoints and sound scanner service to ensure functionality and error handling.
- Updated dependencies to include ffmpeg-python for audio processing.
This commit is contained in:
JSC
2025-07-27 23:34:17 +02:00
parent cb20746f84
commit 36949a1f1c
9 changed files with 1346 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
from fastapi import APIRouter
from app.api.v1 import auth, main, socket
from app.api.v1 import auth, main, socket, sounds
# V1 API router with v1 prefix
api_router = APIRouter(prefix="/v1")
@@ -11,3 +11,4 @@ api_router = APIRouter(prefix="/v1")
api_router.include_router(main.router, tags=["main"])
api_router.include_router(auth.router, prefix="/auth", tags=["authentication"])
api_router.include_router(socket.router, tags=["socket"])
api_router.include_router(sounds.router, tags=["sounds"])