Commit graph

155 commits

Author SHA1 Message Date
edidealt
affb6dd5de
Merge pull request #350 from DanTheMan827/replace-taglib-wasm
Replace taglib-wasm with taglib-ts
2026-03-19 22:22:38 +02:00
Daniel
895d5dd20f feat(metadata): replace taglib-wasm with @dantheman827/taglib-ts
- feat(taglib): updated audio buffer handling in metadata.js to use Uint8Array.
- feat(taglib): refactored addMetadataToAudio to support return type as Blob or Uint8Array

- feat(taglib): add timeout functionality to metadata functions
  - Introduced `withTimeout` utility function to handle operation timeouts.
  - Updated `addMetadataWithTagLib` to use `withTimeout` for promise resolution.
  - Updated `getMetadataWithTagLib` to use `withTimeout` for promise resolution.
  - Added default timeout parameter to both metadata functions.

- feat(taglib): improve metadata handling with ChunkedByteVectorStream
  - Enhanced metadata handling in taglib.ts and taglib.worker.ts to utilize ChunkedByteVectorStream.

- fix(taglib): handle metadata addition failure gracefully
  - Updated `addMetadataWithTagLib` to catch errors and return original audio data if metadata addition fails.

fix(downloads): return original blob if metadata addition fails
 - Wrap addMetadataToAudio call in try-catch to handle errors.

feat(taglib): add direct calling of taglib methods
  - Introduced `direct` parameter to `addMetadataWithTagLib` and `getMetadataWithTagLib` functions for direct processing in the current thread.
  - Exported taglib worker functions.
2026-03-19 15:14:52 -05:00
Daniel
cd64239ba1 refactor(downloads): add readableStreamIterator for easier stream handling
- Introduced `readableStreamIterator` to convert ReadableStream into async iterable.
- Updated `LosslessAPI` to utilize `readableStreamIterator` for handling response body.
- Modified `ZipNeutralinoWriter` to use `readableStreamIterator` for reading chunks.
2026-03-19 15:12:24 -05:00
Srihari NT
677f515e4d fix(ui): fullscreen volume above taskbar, settings overflow, download progress
- #322: Fullscreen overlay padding and main-view scrollable so volume stays above taskbar when Up next is shown

- #313: Settings tab content constrained on small displays with max-width, min-width, overflow-x

- #278: HEAD request before GET for download to get Content-Length for progress bar; resolveDownloadTotalBytes in downloadProgressUtils.js
2026-03-15 15:41:32 +05:30
Daniel
25c338fac3
refactor: improve progress updates 2026-03-12 20:47:47 +00:00
Daniel
574e42ba1e
feat(downloads): dash progress / remove nearly duplicate downloadTrackBlob logic from downloads.js 2026-03-12 20:47:46 +00:00
edideaur
a776e24aee
Merge pull request #303 from DanTheMan827/copilot/extract-duplicated-code-to-ts
Extract shared download utilities and abstract bulk download handlers + new folder picker support
2026-03-12 21:18:47 +02:00
copilot-swe-agent[bot]
c9a1f49f23 feat: extract duplicated download utilities from api.js and downloads.js into download-utils.ts
Co-authored-by: DanTheMan827 <790119+DanTheMan827@users.noreply.github.com>
2026-03-12 06:04:59 +00:00
Samidy
86df459dc1 chore(logs): remove accidental debug log for fetching tracks from artists (HOW DID I FORGET TO DO THIS FOR MONTHS LMFAOOO) 2026-03-12 07:53:51 +03:00
SamidyFR
7e6375919d style: auto-fix linting issues 2026-03-12 04:12:28 +00:00
Samidy
30b2e7d445 fix(downloading): hi-res M4A's having no embedded covers (FUCK YOU TAGLIB) 2026-03-12 07:12:02 +03:00
Samidy
5b4bff97e0
Merge branch 'main' into copilot/add-custom-download-formats 2026-03-12 04:56:28 +03:00
Daniel
33668ae118
fix: correct total tracks per disc and add total discs to metadata for multi-disc albums 2026-03-11 19:26:30 +00:00
Daniel
3e24470401
feat(downloads): add FLAC - Max Compression option and refactor transcoding logic 2026-03-11 19:26:05 +00:00
Daniel
3f2651633b
feat(downloads): add custom download formats 2026-03-11 19:26:05 +00:00
SamidyFR
12baaaa55f style: auto-fix linting issues 2026-03-11 05:23:57 +00:00
Samidy
71a2c5be93 make le diddy infinite radio better kinda 2026-03-11 08:23:27 +03:00
Samidy
f20935d2d2
Merge pull request #274 from DanTheMan827/taglib-wasm
Use taglib-wasm for writing and improve ffmpeg caching
2026-03-11 01:23:40 +03:00
edideaur
2e1367e5c2 video covers 2026-03-10 21:58:02 +00:00
Daniel
1c9c5fa242
Merge https://github.com/monochrome-music/monochrome into taglib-wasm 2026-03-10 18:48:18 +00:00
Samidy
ad615f52f8 fix(covers): embed album art for single track downloads 2026-03-10 10:31:04 +03:00
Samidy
f67123a9d1 fix(inf-radio): IM A DUMBASS 2026-03-10 05:37:51 +03:00
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
Julien Maille
569958f07a feat(api): Implement pagination for albums with many tracks 2026-01-14 21:12:34 +01:00
Samidy
24f5dedcfe I HATE FIREBASE 2026-01-13 23:25:51 +03:00
SamidyFR
5bb028d153 style: auto-fix linting issues 2026-01-11 23:34:32 +00:00
Samidy
f182304c7e add recommended playlist songs, improvements, fixes & more 2026-01-12 02:33:52 +03:00
Julien Maille
a419f38024 js fixes 2026-01-11 00:58:55 +01:00
JulienMaille
dc3ae80d9f style: auto-fix linting issues 2026-01-11 00:36:22 +01:00
Julien Maille
b543112dbb Fix: Improve API rate limit handling during CSV import
- Update 'fetchWithRetry' in api.js to respect Retry-After header and use exponential backoff for 429 errors.
- Add 300ms delay between requests in CSV import loop to reduce load.
2026-01-07 22:52:30 +01:00
Julien Maille
c2467fec5a FIX: deduplicateAlbums 2026-01-04 21:36:19 +01:00
Julien Maille
6ee3c57bc5 IMP: mixes using new API 2026-01-04 18:48:49 +01:00
Julien Maille
efe67045d4 IMP: faster artist loading 2026-01-04 00:24:37 +01:00
Julien Maille
87126a0fe7 IMP: smaller art images for faster loading 2026-01-03 23:44:25 +01:00
Julien Maille
bff48ad21c IMP: remove heuristic filtering for EPs/Singles, rely on API type 2026-01-02 18:03:36 +01:00
Julien Maille
34dba30d6b IMP: mix, similar stuff 2026-01-01 22:04:12 +01:00
Julien Maille
57f3e42dbe new: mix for artists, use new api 2026-01-01 19:27:29 +01:00
Julien Maille
4ffac0ae0a Prepare for similar artists coming from tidal api 2026-01-01 15:50:31 +01:00
Julien Maille
d0cc9f03f1 feat: add playlist pagination and separate api/streaming instances
- Implements pagination in getPlaylist to support large playlists (>100 tracks).
- Reworks instance management to support separate api and streaming instance groups.
- Updates instances.json to the new grouped structure.
- Refactors apiSettings for smart incremental speed testing and type-aware caching.
- Parallelizes speed tests using appropriate endpoints (/artist/ for API, /track/ for Streaming).
- Updates Settings UI to display and manage both API and Streaming instance groups.
2026-01-01 15:38:02 +01:00
Julien Maille
6776d2fe38 NEW: handle large playlist if api has offset capability 2026-01-01 13:35:07 +01:00
Julien Maille
63854f4d69 wip add metadata 2025-12-26 13:51:04 +01:00
Julien Maille
9533155656 Enhance artist page by fetching EPs and Singles via search fallback 2025-12-25 23:11:08 +01:00
Julien Maille
4183cef4f1 fix: resolve multiple bugs including playback loops and search race conditions 2025-12-24 13:49:29 +01:00
Julien Maille
1415c350c5 feat: add playlist search tab and fix playlist detail rendering 2025-12-23 21:17:56 +01:00
google-labs-jules[bot]
43f04e7454 Fix "Invalid Date" display in album details
- Backfill album release date from tracks if missing in API response.
- Gracefully handle invalid or missing dates in UI rendering.
- Fix potential NaN in download folder naming due to invalid dates.
2025-12-23 13:33:24 +01:00
Samidy
2fd16c7366 fix artists not saving on home + showing as unknown 2025-12-17 12:11:04 +03:00
Samidy
c0543b15a5 Fix albums breaking (ai saving my ass rn) 2025-12-17 12:06:33 +03:00
Samidy
131e834d52
add clunky fuckass fix for malformed track response 2025-12-14 10:14:13 -08:00
eduardprigoana
ae7fae9b3d naming 2025-11-17 21:43:33 +02:00
Eduard Prigoana
ab67a5c2dd playlist support 2025-11-08 19:17:52 +02:00
Eduard Prigoana
0c9dec35ff c 2025-10-22 10:31:45 +03:00