19 Commits

Author SHA1 Message Date
Geert Rademakes
4361531513 fix: Map audio format names to user-friendly display names
- Add mapFormatToDisplayName function to convert container formats to display names
- Map 'MPEG' container format to 'MP3' for better user experience
- Map other common formats: WAVE->WAV, FLAC->FLAC, AAC->AAC, etc.
- Fallback to file extension if container format not recognized
- Apply format mapping in both successful and error cases
- Ensure consistent format display across the application

Now MP3 files will display as 'MP3' instead of 'MPEG' in the UI.
2025-08-06 15:15:28 +02:00
Geert Rademakes
1bb1f7d0d5 fix: Resolve scrolling and audio playback issues
- Fix scrolling on Music Storage page by adding proper overflow handling
- Add height constraints and flex layout for better tab panel scrolling
- Update streaming endpoint to use presigned URLs instead of direct URLs
- Improve audio error handling with better error messages
- Update MusicPlayer component with dark theme styling
- Add loading indicators and error states for better UX
- Fix audio playback for files synced from S3 subdirectories

The Music Storage page now has proper scrolling behavior and
audio playback should work correctly for all music files.
2025-08-06 15:05:33 +02:00
Geert Rademakes
7f186c6337 feat: Add recursive S3 file discovery and sync functionality
- Add listAllFiles() method to S3Service to recursively list all files in S3 bucket
- Add getFileContent() method to download file content for metadata extraction
- Add /api/music/sync-s3 endpoint to sync S3 files with database
- Add 'Sync S3' button to Music Storage page
- Support for files in subdirectories like /Disco/
- Automatic metadata extraction for synced files
- Recursive file discovery finds all files regardless of directory structure

This allows the system to find and sync music files that were uploaded
directly to S3/MinIO, including files in subdirectories, and make them
available for song matching and browser playback.
2025-08-06 14:57:46 +02:00
Geert Rademakes
3fdd5d130f fix: Update test scripts to work with ES modules and fix import issues
- Fix test-s3.js to use direct AWS SDK imports instead of TypeScript services
- Rename test-complete-setup.js to .mjs for ES module support
- Update test scripts to avoid importing uncompiled TypeScript files
- Add comprehensive S3 connection and audio metadata validation
- Update testing guide with correct file extensions and troubleshooting
- Fix module resolution issues for testing scripts

The test scripts now work without requiring TypeScript compilation
and provide comprehensive validation of the S3 setup.
2025-08-06 14:19:05 +02:00
Geert Rademakes
870ad39b94 fix: Remove S3 data from XML export - keep pure Rekordbox XML
- Remove all S3 data from XML export to keep it pure Rekordbox XML
- XML export is purely for re-importing into Rekordbox
- S3 functionality is purely for browser playback and management
- Maintain clean separation between Rekordbox and browser functionality
- Update documentation to clarify this important distinction

The XML export now contains exactly the same structure as the original
Rekordbox XML with no additional S3 information, ensuring perfect
compatibility for re-importing into Rekordbox.
2025-08-06 14:10:35 +02:00
Geert Rademakes
b120a7cf6d feat: Preserve original file paths and add S3 information alongside
- Update Song model to preserve original location field from Rekordbox XML
- Add s3File object to Song model with S3 information alongside original location
- Update SongMatchingService to link S3 files while preserving original paths
- Add location-based matching for better accuracy
- Update XML export to include S3 information while preserving original location
- Update frontend components to show both original paths and S3 information
- Add new section in SongMatching to show songs with music files
- Enhance SongList to display original file paths with folder icon

This ensures that:
- Original file paths from Rekordbox XML are preserved
- S3 information is added alongside, not replacing original data
- XML export maintains compatibility while adding S3 data
- Users can see both original paths and S3 streaming URLs
- Matching algorithms consider original file paths for better accuracy
2025-08-06 14:07:24 +02:00
Geert Rademakes
4a7d9c178a feat: Add intelligent song matching system
- Add SongMatchingService with multi-criteria matching algorithms
- Add matching API routes for auto-linking and manual matching
- Add SongMatching component with statistics and suggestion modal
- Update SongList to show music file availability and play buttons
- Update MusicStorage page with song matching tab
- Enhance Song interface with music file integration
- Add comprehensive matching statistics and reporting

Features:
- Filename, title, artist, album, and duration matching
- Fuzzy matching with Levenshtein distance
- Confidence scoring and match type classification
- Auto-linking with configurable thresholds
- Manual matching with detailed suggestions
- Visual indicators for music file availability
- Integration with existing playlist functionality

Matching algorithms prioritize:
1. Exact filename matches
2. Artist-Title pattern matching
3. Metadata-based fuzzy matching
4. Duration-based validation

The system provides a complete workflow from upload to playback,
automatically linking music files to Rekordbox songs with manual
override capabilities for unmatched files.
2025-08-06 13:55:18 +02:00
Geert Rademakes
7000e0c046 feat: Implement S3 music storage and playback functionality
- Add S3Service for file operations with MinIO/AWS S3 support
- Add AudioMetadataService for metadata extraction
- Add MusicFile model with MongoDB integration
- Add music API routes for upload, streaming, and management
- Add MusicUpload component with drag-and-drop functionality
- Add MusicPlayer component with custom audio controls
- Add MusicStorage page with complete music management interface
- Update Docker Compose with MinIO service
- Add comprehensive documentation and testing utilities

Features:
- S3-compatible storage (MinIO for local, AWS S3 for production)
- Audio file upload with metadata extraction
- Browser-based music streaming and playback
- File management (upload, delete, search, filter)
- Integration with existing Rekordbox functionality
- Security features (file validation, presigned URLs)
- Performance optimizations (indexing, pagination)

Supported formats: MP3, WAV, FLAC, AAC, OGG, WMA, Opus
2025-08-06 13:44:17 +02:00
Geert Rademakes
1450eaa29b feat: Support full Rekordbox master collection format - Include all track properties (Composer, Album, Genre, Size, TotalTime, etc.) - Add PRODUCT section with rekordbox version info - Include TEMPO entries for beat grid information - Use proper indentation and formatting like master collection - Support KeyType and Entries attributes for playlists - Handle large libraries (7000+ songs) with streaming export - Full compatibility with Rekordbox master collection format 2025-08-06 13:34:08 +02:00
Geert Rademakes
b6467253a3 fix: Match Rekordbox XML format exactly - Use compact XML format without line breaks or indentation - Include only TrackID, Name, and Artist attributes for tracks - Use Count attribute instead of Entries for playlists - Set correct Count="4" on ROOT node for playlist count - Remove encoding declaration to match Rekordbox format - Export now 100% compatible with Rekordbox import/export 2025-08-06 13:31:46 +02:00
Geert Rademakes
4452a78b16 perf: Implement streaming XML export for large libraries - Add streamToXml function that processes data in batches - Stream songs in chunks of 100 to avoid memory issues - Write XML directly to response stream instead of building in memory - Add progress logging for large exports - Proper XML escaping for special characters - Much better performance for libraries with thousands of songs 2025-08-06 11:31:50 +02:00
Geert Rademakes
7286140bd5 feat: Move export functionality to backend for complete database export - Create backend XML service for generating Rekordbox-compatible XML - Add /api/songs/export endpoint that exports entire database - Frontend now calls backend API instead of local function - Exports ALL songs and playlists from database, not just loaded ones - Proper file download with correct headers and filename 2025-08-06 11:26:51 +02:00
Geert Rademakes
02ae12294c feat: Show total playlist duration instead of loaded songs duration - Add totalDuration calculation in backend playlist endpoint - Update frontend to display total playlist duration - Duration now shows entire playlist length, not just loaded songs - Prevents duration from changing when scrolling through songs 2025-08-06 10:30:02 +02:00
Geert Rademakes
7fb8614130 feat: Major performance optimizations - Add React.memo, useMemo, and useCallback to prevent unnecessary re-renders - Implement request cancellation with AbortController to prevent memory leaks - Add debounced search to reduce API calls - Optimize song selection and playlist switching performance - Fix browser crashes and memory leaks - Add proper cleanup functions 2025-08-06 10:03:26 +02:00
Geert Rademakes
e98fdf50cb bigger payload 2025-04-29 09:52:45 +02:00
Geert Rademakes
40c75d479a Nice onboarding flow & reset database function 2025-04-25 10:42:45 +02:00
Geert Rademakes
3a13c24301 Folders working! 2025-04-24 23:45:14 +02:00
Geert Rademakes
3e8141aeba Added docker compose deployments 2025-04-24 15:46:10 +02:00
Geert Rademakes
901c78990b frontend AND backend bro!! 2025-04-24 15:28:22 +02:00