Commit
Refactor: Improve audio processing and resumable uploads
Commit details
Commit notes
This commit introduces several improvements:
- **Audio Processing:** - New `generatePreviewToFile` and `generateSequencerFileToFile` functions in `ffmpeg.ts` allow generating output files directly, avoiding unnecessary buffering. - `extractRawAudioFromFilePath` in `audio-analysis.ts` enables analysis on existing file paths, reducing memory usage. - `analyzeAudioFromFile` provides a memory-efficient way to analyze audio files. - The worker process now uses these new functions for more efficient audio processing.
- **Resumable Uploads:** - The upload system is refactored to use a single resumable upload mechanism. - Uploads are now initiated via `/api/v1/uploads/chunked/initiate`. - Chunk status and upload progress are managed more robustly. - Local storage is used to resume interrupted uploads. - The `uploads-resumable` route handles the new upload logic.
- **API and Frontend:** - Error handling for API responses is improved in `auth.ts` and `library.ts`. - `eden.ts` is updated to correctly handle headers and fetchers. - The library page now correctly displays upload completion status.
- **Dependencies:** - `pnpm-lock.yaml` is updated to reflect dependency changes.
Co-authored-by: armin.naimi <[email redacted]>
- Files changed
- 14
- Lines added
- +4,996
- Lines removed
- −3,445