Commit graph

83 commits

Author SHA1 Message Date
Daniel
37f70f5390
Temporarily force FLAC files to go through ffmpeg
Something is wrong with the structure of the downloaded files and taglib is NOT happy with them
2026-03-09 15:56:42 +00:00
Daniel
42101353ab
feat(metadata): re-add flac and m4a metadata code as separate files 2026-03-09 15:54:28 +00:00
Daniel
de472c5891
Merge remote-tracking branch 'upstream' into taglib-wasm 2026-03-09 02:43:12 +00:00
Daniel
497d42b9fd
feat(ffmpeg): enhance progress tracking and logging
- Improved progress tracking in FFmpeg worker by extracting total duration and current time from logs.
- Updated downloadTrackBlob function to use console logging for progress updates.
- Enhanced error handling and progress reporting during audio encoding.
2026-03-09 00:35:09 +00:00
SamidyFR
c8b919a4c7 style: auto-fix linting issues 2026-03-09 00:04:26 +00:00
Samidy
83c705a60a Merge branch 'main' of github.com:monochrome-music/monochrome 2026-03-09 03:03:59 +03:00
Samidy
75d16e6ce4 feat: music videos 2026-03-09 03:03:29 +03:00
Julien Maille
4d938b5478 UI: show FFmpeg encoding progress in toaster 2026-03-08 20:59:35 +01:00
Daniel
0f20106076 feat(downloads): prefetch data while downloading to improve performance and update taglib-wasm 2026-03-08 01:55:42 +00:00
Daniel
44a7c3b61c fix(downloads): cache ffmpeg core js and wasm
This creates a blob url outside of the worker for for the core .js and .wasm files so they aren't downloaded on each run.
2026-03-08 01:54:29 +00:00
Daniel
50a5b79d70 feat(downloads): use taglib-wasm to set tags
taglib supports multiple media formats beyond what was previously supported, this would enable transcoding to other formats without needing to write additional metadata libraries.
2026-03-08 01:54:29 +00:00
Eric D'Addario
39206f4128 feat(downloads): save replay gain tags to FLAC metadata 2026-02-28 16:03:45 -05:00
binimum
fb5fe05414
Remux instead of transcode 2026-02-28 11:59:27 +00:00
Samidy
fc28f9faeb
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-28 02:00:58 +03:00
Daniel
07422debb9
feat(downloads): add lossless container option
This uses ffmpeg to ensure that the downloaded lossless audio is in the desired container format.
2026-02-27 21:23:33 +00:00
SamidyFR
4aaffd2c22 style: auto-fix linting issues 2026-02-26 23:19:38 +00:00
Samidy
1c1d202e91
Merge pull request #235 from gpulch/feat/mp3-download-ffmpeg-wasm
feat: add ffmpeg.wasm + MP3 320kbps download option
2026-02-27 02:19:13 +03:00
Eduard Prigoana
424ee12d04 feat: animated covers 2026-02-24 12:43:36 +00:00
SamidyFR
700645919c style: auto-fix linting issues 2026-02-23 22:58:08 +00:00
Samidy
38434f5419 Merge branch 'main' of github.com:monochrome-music/monochrome 2026-02-24 01:57:43 +03:00
Eduard Prigoana
895cc20d26 whoops 2026-02-23 17:50:35 +00:00
gpulch
cde7080052 fix: address code review feedback
Inline fixes:
- Remove TDRC frame from ID3 writer (ID3v2.3 uses TYER only, not TDRC)
- Add try/finally cleanup in worker to prevent VFS leaks on errors
- Fix Blob creation to use Uint8Array directly (avoid extra bytes)
- Replace loadFFmpeg race guard with promise singleton pattern
- Add -map_metadata -1 to strip source metadata (prevent duplicate ID3)

Error handling improvements:
- Create MP3EncodingError class with code property for reliable detection
- Update api.js to use instanceof check instead of string matching
- Pass AbortSignal to encodeToMp3 for proper cancellation support
- Remove error re-wrapping in mp3-encoder.js (preserve original errors)

Technical details:
- Promise singleton ensures FFmpeg loads once even with concurrent calls
- AbortSignal listener properly cleaned up on success/error/abort
- Virtual FS cleanup in finally block prevents file leaks
- MP3EncodingError.code = 'MP3_ENCODING_FAILED' for robust detection
2026-02-23 10:49:05 +01:00
gpulch
8a17bddbc3 feat: add MP3 320kbps download option with ffmpeg.wasm
Implements MP3 320kbps download functionality using ffmpeg.wasm for
industry-standard encoding with libmp3lame.

Features:
- New MP3_320 quality option in download settings UI
- ID3v2.3 metadata writing (title, artist, album, cover art, ISRC, etc.)
- Non-blocking encoding via Web Worker to keep UI responsive
- Proper UTF-16 with BOM text encoding for international characters
- Album artist fallback to track artist (mirrors FLAC/M4A behavior)
- Automatic format detection for downloaded audio
- Year validation to prevent writing NaN to ID3 tags

Implementation:
- mp3-encoder.js: Main encoder module with worker orchestration
- mp3-encoder.worker.js: FFmpeg Web Worker for async encoding
- id3-writer.js: ID3v2.3 tag writer with synchsafe size encoding
- Updates to api.js, metadata.js, utils.js for MP3 support
- Vite config excludes @ffmpeg packages from dep optimization

Technical details:
- Uses @ffmpeg/ffmpeg (libmp3lame 320kbps CBR, 44.1kHz)
- FFmpeg binary lazy-loaded from CDN (~25MB, cached)
- Encoding runs in separate thread (non-blocking UI)
- Proper error handling with distinct encoding vs network errors
- Memory-efficient: transfers ArrayBuffer with zero-copy

Dependencies:
- @ffmpeg/ffmpeg ^0.12.10
- @ffmpeg/util ^0.12.1
- Removed: package-lock.json (project uses bun.lock)

Closes maintainer request to use ffmpeg.wasm instead of lamejs.
2026-02-22 19:13:03 +01:00
Samidy
77d99245c8 feat(artists): artists socials 2026-02-22 01:04:02 +03:00
binimum
1188a2dcce style: auto-fix linting issues 2026-02-21 14:57:44 +00:00
binimum
01309a9a15
Change instances.json in favour of Workers which have live API uptime 2026-02-21 14:56:55 +00:00
Samidy
8c79e69382 feat(search): search recs in queue 2026-02-21 02:30:03 +03:00
BlackSigkill
acc9d8b5cd add tidal biography to artists pages 2026-02-19 23:37:18 +01:00
Eduard Prigoana
03a7dcda52 fix codeql suggestions 2026-02-18 03:30:20 +00:00
IsraelGPT
762488d823 load skeleton styling 2026-02-15 23:39:56 +00:00
Julien Maille
8f27000fcf add RPC to neutralino 2026-02-10 00:15:46 +01:00
binimum
f79e07837e style: auto-fix linting issues 2026-02-08 20:02:52 +00:00
binimum
133f484e4e
Urgently fix API spam issues 2026-02-08 20:00:53 +00:00
Eduard Prigoana
3294eaf2fa fix album date and artist on search 2026-02-07 13:27:55 +00:00
Eduard Prigoana
015003225c (TEMPORARY) stop DDOSING apis on search 2026-02-04 23:12:58 +02:00
BlackSigkill
8eaf3b376e Add a toggle to choose what kind of track date you want 2026-02-03 14:47:45 +01:00
BlackSigkill
9780263cf7 show album release date next to tracks 2026-02-03 13:09:01 +01:00
SamidyFR
90971dc191 style: auto-fix linting issues 2026-01-26 23:28:45 +00:00
Samidy
6d9d2f4f89 fix(streaming): fix Hi-res playback on Firefox 2026-01-27 02:28:16 +03:00
JulienMaille
15c3702cae style: auto-fix linting issues 2026-01-26 21:12:21 +00:00
Julien Maille
2e322ac8a6 fix(downloads): detect actual format for all download paths
Fixes #117

- Add getExtensionFromBlob() to detect format from blob signature
- DASH Hi-Res streams are MP4 containers, not raw FLAC
- Fix api.downloadTrack to detect and correct filename extension
- Fix bulk download functions to use detected extension
- Fallback to mime type if signature detection fails
2026-01-26 22:11:50 +01:00
SamidyFR
4ede3b2664 style: auto-fix linting issues 2026-01-24 12:13:44 +00:00
Samidy
3f3e12817f basically monochrome 2.0 lol 2026-01-24 15:13:19 +03:00
Samidy
5975fdbac7 make HI-Res default 2026-01-20 00:29:28 +03:00
JulienMaille
716a1b7b05 style: auto-fix linting issues 2026-01-18 22:42:00 +00:00
Julien Maille
baeff12c54 feat: handle unavailable tracks in playlists and mixes 2026-01-18 23:41:30 +01:00
Julien Maille
024f44aa05 feat: rotate API instances on rate limits and errors 2026-01-18 23:21:32 +01:00
JulienMaille
de74cebd7c style: auto-fix linting issues 2026-01-16 18:35:32 +01:00
Julien Maille
1e7595c159 WIP: hi-res support 2026-01-16 18:35:32 +01:00
JulienMaille
02e161b0a4 style: auto-fix linting issues 2026-01-14 20:13:25 +00:00