22 Commits

Author SHA1 Message Date
JSC
a82acfae50 feat: Implement sound playback with credit validation in VLCPlayerService and update WebSocket handling
Some checks failed
Backend CI / lint (push) Failing after 5m0s
Backend CI / test (push) Failing after 2m0s
2025-08-19 22:16:48 +02:00
JSC
560ccd3f7e refactor: Improve code readability by formatting query parameters in user endpoints and enhancing error handling in sound playback 2025-08-19 22:09:50 +02:00
JSC
6b55ff0e81 Refactor user endpoint tests to include pagination and response structure validation
- Updated tests for listing users to validate pagination and response format.
- Changed mock return values to include total count and pagination details.
- Refactored user creation mocks for clarity and consistency.
- Enhanced assertions to check for presence of pagination fields in responses.
- Adjusted test cases for user retrieval and updates to ensure proper handling of user data.
- Improved readability by restructuring mock definitions and assertions across various test files.
2025-08-17 12:36:52 +02:00
JSC
f906b6d643 feat: Enhance favorites functionality; add favorites filtering to playlists and sounds, and improve favorite indicators in responses 2025-08-16 21:41:50 +02:00
JSC
78508c84eb feat: Add favorites filtering to sound retrieval; include user-specific favorite sounds in the API response 2025-08-16 21:27:40 +02:00
JSC
a947fd830b feat: Implement favorites management API; add endpoints for adding, removing, and retrieving favorites for sounds and playlists
feat: Create Favorite model and repository for managing user favorites in the database
feat: Add FavoriteService to handle business logic for favorites management
feat: Enhance Playlist and Sound response schemas to include favorite indicators and counts
refactor: Update API routes to include favorites functionality in playlists and sounds
2025-08-16 21:16:02 +02:00
JSC
bee1076239 refactor: Improve exception handling and logging in authentication and playlist services; enhance code readability and structure
All checks were successful
Backend CI / lint (push) Successful in 9m21s
Backend CI / test (push) Successful in 4m18s
2025-08-13 00:04:55 +02:00
JSC
f094fbf140 fix: Add missing commas in function calls and improve code formatting
Some checks failed
Backend CI / lint (push) Failing after 4m51s
Backend CI / test (push) Successful in 4m19s
2025-08-12 23:37:38 +02:00
JSC
aa9a73ac1d feat: Add search and sorting functionality to sound repository and API
Some checks failed
Backend CI / lint (push) Failing after 4m54s
Backend CI / test (push) Failing after 3m46s
2025-08-10 15:33:15 +02:00
JSC
b4f0f54516 Refactor sound and extraction services to include user and timestamp fields
All checks were successful
Backend CI / lint (push) Successful in 18m8s
Backend CI / test (push) Successful in 53m35s
- 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.
2025-08-03 20:54:14 +02:00
JSC
4bbae4c5d4 feat: Add endpoint to retrieve sounds with optional type filtering and implement corresponding repository method
Some checks failed
Backend CI / lint (push) Successful in 9m41s
Backend CI / test (push) Failing after 1m39s
2025-08-01 22:03:09 +02:00
JSC
d2d0240fdb feat: Add audio extraction endpoints and refactor sound API routes 2025-08-01 21:39:42 +02:00
JSC
6068599a47 Refactor test cases for improved readability and consistency
All checks were successful
Backend CI / lint (push) Successful in 9m49s
Backend CI / test (push) Successful in 6m15s
- Adjusted function signatures in various test files to enhance clarity by aligning parameters.
- Updated patching syntax for better readability across test cases.
- Improved formatting and spacing in test assertions and mock setups.
- Ensured consistent use of async/await patterns in async test functions.
- Enhanced comments for better understanding of test intentions.
2025-08-01 20:53:30 +02:00
JSC
3132175354 refactor: Create admin enpoints and some renaming of api endpoints 2025-08-01 15:34:35 +02:00
JSC
a10111793c fix: Lint fixes of services
All checks were successful
Backend CI / test (push) Successful in 3m59s
2025-08-01 01:27:47 +02:00
JSC
95ccb76233 fix: Lint fixes of api and repositories
All checks were successful
Backend CI / test (push) Successful in 3m58s
2025-07-31 22:29:11 +02:00
JSC
8847131f24 Refactor test files for improved readability and consistency
- Removed unnecessary blank lines and adjusted formatting in test files.
- Ensured consistent use of commas in function calls and assertions across various test cases.
- Updated import statements for better organization and clarity.
- Enhanced mock setups in tests for better isolation and reliability.
- Improved assertions to follow a consistent style for better readability.
2025-07-31 21:37:04 +02:00
JSC
e43650c26c Add tests for sound repository, user OAuth repository, credit service, and credit decorators
- Implement comprehensive tests for SoundRepository covering CRUD operations and search functionalities.
- Create tests for UserOauthRepository to validate OAuth record management.
- Develop tests for CreditService to ensure proper credit management, including validation, deduction, and addition of credits.
- Add tests for credit-related decorators to verify correct behavior in credit management scenarios.
2025-07-30 21:33:55 +02:00
JSC
dd10ef5d41 feat: Add VLC player API endpoints and associated tests
- Implemented VLC player API endpoints for playing and stopping sounds.
- Added tests for successful playback, error handling, and authentication scenarios.
- Created utility function to get sound file paths based on sound properties.
- Refactored player service to utilize shared sound path utility.
- Enhanced test coverage for sound file path utility with various sound types.
- Introduced tests for VLC player service, including subprocess handling and play count tracking.
2025-07-30 20:46:49 +02:00
JSC
9b5f83eef0 feat: Implement background extraction processor with concurrency control
- Added `ExtractionProcessor` class to handle extraction queue processing in the background.
- Implemented methods for starting, stopping, and queuing extractions with concurrency limits.
- Integrated logging for monitoring the processor's status and actions.
- Created tests for the extraction processor to ensure functionality and error handling.

test: Add unit tests for extraction API endpoints

- Created tests for successful extraction creation, authentication checks, and processor status retrieval.
- Ensured proper responses for authenticated and unauthenticated requests.

test: Implement unit tests for extraction repository

- Added tests for creating, retrieving, and updating extractions in the repository.
- Mocked database interactions to validate repository behavior without actual database access.

test: Add comprehensive tests for extraction service

- Developed tests for extraction creation, service detection, and sound record creation.
- Included tests for handling duplicate extractions and invalid URLs.

test: Add unit tests for extraction background processor

- Created tests for the `ExtractionProcessor` class to validate its behavior under various conditions.
- Ensured proper handling of extraction queuing, processing, and completion callbacks.

fix: Update OAuth service tests to use AsyncMock

- Modified OAuth provider tests to use `AsyncMock` for mocking asynchronous HTTP requests.
2025-07-29 01:06:29 +02:00
JSC
34e6289f92 Add sound normalization endpoints and corresponding tests
- Implemented endpoints for normalizing all sounds, normalizing sounds by type, and normalizing a specific sound by ID in the sounds API.
- Added dependency injection for the SoundNormalizerService.
- Included role-based access control to restrict normalization actions to admin users.
- Created comprehensive test cases for the new normalization endpoints, covering success scenarios, parameter handling, and error cases.
- Removed redundant test file for sound normalizer endpoints as tests are now integrated into the main sound endpoints test suite.
2025-07-28 17:15:21 +02:00
JSC
36949a1f1c 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.
2025-07-27 23:34:17 +02:00