Commit Graph

63 Commits

Author SHA1 Message Date
xtrullor73
441d89cca4 test(utils): add tests for utility functions in utils folder 2024-07-04 11:57:43 -07:00
xtrullor73
068e53857f fix(utils): normalize paths to use forward slashes for consistent platform support 2024-07-04 11:21:10 -07:00
xtrullor73
52a2f73c58 fix(utils): normalize paths to use forward slashes for consistent platform support 2024-07-04 11:10:34 -07:00
xtrullor73
7148ab0208 test: add test cases for metadata adapters 2024-07-03 11:43:19 -07:00
xtrullor73
063a692b11 test: add test cases for generateUniqueFilename function 2024-07-01 20:46:59 -07:00
xtrullor73
f19aaac8d5 test(setup): add Mocha, Chai, and Sinon for testing setup 2024-07-01 20:45:11 -07:00
xtrullor73
448e96e1fd chore(deps): remove redundant qs library in favor of built-in
querystring"
2024-06-23 16:39:19 -07:00
Xtrullor73
7cee22ae7f chore(docker): reduce Docker image size by optimizing dependency installations
- Use multi-stage builds to prune development dependencies
- Achieve reduced final image size by installing only necessary runtime dependencies
2024-06-18 01:23:27 -07:00
xtrullor73
f3f79dfa5f docs: remove redundant bullet 2024-06-12 20:08:13 -07:00
xtrullor73
436641fb6e docs: update installation instructions to include Chromaprint dependency 2024-06-12 20:06:16 -07:00
xtrullor73
06509c5695 feat(docker): create and configure Dockerfile for project
- Add Dockerfile to project root
- Install required dependencies including ffmpeg and libchromaprint-tools
- Set up working directory and copy necessary files
- Define entry point for running CLI application
- Configure volume mounting to reflect changes between container and local directory
2024-06-12 19:56:27 -07:00
xtrullor73
0e28042d84 feat: add cleanup function to delete images directory after execution 2024-05-27 17:20:42 -07:00
xtrullor73
56dbb5df31 chore: prepare for npm publishing 2024-05-27 17:01:57 -07:00
xtrullor73
e55b4b8651 docs: update README with complete project documentation
- Add detailed project description
- Include installation instructions
- Provide usage examples and features
2024-05-27 16:44:31 -07:00
xtrullor73
cb500038be refactor: apply eslint fixes and minor clean up 2024-05-27 16:24:29 -07:00
xtrullor73
91a56e0ff7 fix(validation): prevent overwriting files with same artist and title by generating unique filenames
- Implement generateUniqueFilename to ensure each file is saved with a unique name

These changes address the issue when two or more different songs by the same artist and with the same title overwrite each other
2024-05-27 16:07:09 -07:00
xtrullor73
f63bab30f0 refactor(validation): abstract MIME type validation in validateAudioFile; check supported extensions in fileService; enhance docs and error logging 2024-05-27 15:53:47 -07:00
xtrullor73
f8f6ae688e refactor(utils, services): enhance download and save image functionality
- Refactor downloadImage to use a consistent directory creation method
- Ensure directories exist before saving images
- Improve error handling for file and HTTP operations
- Update saveImageToFile to resolve paths and handle directories
  robustly
2024-05-27 15:49:58 -07:00
xtrullor73
156053065a refactor: move setup checks to a separate folder for enhanced directory structure 2024-05-25 00:47:56 -07:00
xtrullor73
8d1a27285f refactor: streamline env var error messages and general cleanup 2024-05-25 00:44:47 -07:00
xtrullor73
7f3dd2c93a feat: implement saveImageToFile to save downloaded images in a given directory 2024-05-25 00:43:04 -07:00
xtrullor73
739c18dd45 feat: add function to rename audio files by metadata 2024-05-25 00:42:30 -07:00
xtrullor73
b3fd524e36 feat: implement downloadImageToFile for streaming downloads with axios 2024-05-25 00:41:40 -07:00
xtrullor73
68ae0c105b chore: add ffmetadata package which also requires FFmpeg to be installed in PATH for Windows 2024-05-25 00:28:21 -07:00
xtrullor73
29ba0f56a7 refactor: streamline fetchFiles function and improve error handling 2024-05-25 00:24:16 -07:00
xtrullor73
7fe0504291 chore: update .gitignore to exclude test files and asset directories 2024-05-25 00:20:31 -07:00
xtrullor73
683a945dde feat(eslint-config): extend ruleset with custom linting exceptions and adjustments 2024-05-25 00:19:31 -07:00
xtrullor73
7c2f003d57 docs: update JSDoc return type for axiosRetry promise 2024-05-25 00:17:23 -07:00
xtrullor73
0c4d323946 fix: correct instanceof check for filePaths array validation 2024-05-25 00:14:51 -07:00
xtrullor73
09eb193943 refactor: update project directories for enhanced file organization 2024-05-25 00:12:46 -07:00
xtrullor73
8029cb8fea feat(recognition): add retry logic to Audd API requests and return filePath alongside with response data 2024-05-24 23:44:37 -07:00
xtrullor73
97f6a31ff6 refactor: update jsdoc comments and optimize promise handling 2024-05-24 23:41:36 -07:00
xtrullor73
85830abb5f refactor: enhance jsdoc for clarity and improve error handling 2024-05-24 23:41:22 -07:00
xtrullor73
52dc2c7d5b refactor(api): streamline MusicBrainz metadata request by reducing included entities 2024-05-21 00:02:19 -07:00
xtrullor73
c413ad11f8 fix(lyric-api): enhance error handling for 404 not found cases 2024-05-20 23:58:09 -07:00
xtrullor73
fd99687ed4 fix(cover-art): enhance error handling for 404 not found case, and standardize error response 2024-05-20 23:55:58 -07:00
xtrullor73
3329fddcb1 feat(metadata): optimize metadata fetching for MusicBrainz IDs with concurrent API calls and retain file path associations 2024-05-20 23:46:48 -07:00
xtrullor73
e3bc3af46a refactor: link processing results with file paths inside objects 2024-05-20 23:42:27 -07:00
xtrullor73
3ab402fde7 chore: update .gitignore to exclude mp3s, music, and images folders 2024-05-20 16:53:13 -07:00
xtrullor73
a8073089ce refactor(cli): update jsdocs, comments, and structure 2024-05-20 16:50:43 -07:00
xtrullor73
d7d99d701e chore: remove unused libraries from package.json 2024-05-13 22:14:47 -07:00
xtrullor73
d8683cb8ad feat: Refactor project structure for modularity and expandability
- Implemented the service and adapter layers instead of controllers to simplify the integration of new audio recognition and metadata fetching APIs.
- Unified code styling and practices throughout the project to ensure consistency.
2024-05-13 22:11:08 -07:00
xtrullor73
bcdc66ca18 feat: add image retrieval functionality using coverartarchive.org API 2024-05-12 20:00:57 -07:00
xtrullor73
caf9d554ef feat: add lyric retrieval feature 2024-05-12 18:19:36 -07:00
Xtrullor73
02122e6b55 feat(api-integration): implement MusicBrainz API integration and error handling
- Create metadataController to orchestrate the retrieval of metadata for given recording IDs.
- Develop metadataRetrieval for direct API communication with MusicBrainz, handling request execution and response parsing.
- Implement musicBrainzApiErrorHandler from scratch to provide specific error messages for different HTTP response codes related to MusicBrainz API requests.
- Ensure complete integration across newly written components for a cohesive metadata retrieval flow.

These changes establish a new MusicBrainz API integration system that facilitates metadata retrieval with comprehensive error handling features, improving the resilience and maintainability of the application.
2024-05-12 17:51:56 -07:00
xtrullor73
538ffdbe36 feat: integrate AcoustID for song recognition using audio fingerprinting
- Transitioned audio recognition in audioRecognition service from Audd API to AcoustID, leveraging audio fingerprinting instead of direct audio file analysis.

- Created acoustidApiErrorHandler for modular error handling within the audioRecognition service.

- Developed a retry mechanism for axios requests in the retryAxios service to enhance robustness.

- Added dependencies on fpcalc and chromaprint to generate audio fingerprints, now required to be installed and set in the system PATH for Windows environments.
2024-05-11 19:45:26 -07:00
xtrullor73
0cd351f140 refactor: move checkEnvVariables and checkInputPath to services directory 2024-05-11 19:25:06 -07:00
xtrullor73
a97736abee refactor: remove AuDD references and unused project files
Removed all files, dependencies, and mentions related to the AuDD API. Cleaned up the src directory, removing all non-developed or unused items, as part of a major cleanup. This change is due to the strategic shift towards using audio fingerprinting for song recognition, as opposed to sending the raw audio file itself.
2024-05-09 23:40:46 -07:00
xtrullor73
8bb93cafd6 feat: improve error handling and add streamline audio processing
- Refactor error handling by consolidating all errors in a newly created 'errors' directory.
- Introduce truncateAudioStream functionality to limit audio file processing to 25 seconds, optimizing performance and API usage.

The newly added 'errors' directory contains the apiError handler which provides a centralized error handling mechanism to easily manage error consistency and possible expansion in the future.
2024-05-07 20:00:36 -07:00
xtrullor73
0f96fdd89f feat(spotify-api): add track metadata fetching function 2024-05-02 15:42:17 -07:00