Commit graph

53 commits

Author SHA1 Message Date
Daniel
1c9c5fa242
Merge https://github.com/monochrome-music/monochrome into taglib-wasm 2026-03-10 18:48:18 +00:00
SamidyFR
dd2639b5f0 style: auto-fix linting issues 2026-03-10 07:31:34 +00:00
Samidy
ad615f52f8 fix(covers): embed album art for single track downloads 2026-03-10 10:31:04 +03:00
Daniel
65e1b4e98d
fix(metadata): remove unnecessary audio buffer type check in addMetadataToAudio 2026-03-09 15:58:53 +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
efa3521aff
feat(taglib): refactor and improve metadata handling, worker integration, and code quality
- Refactor metadata handling to use fetchTagLib and addMetadataWithTagLib for improved loading and worker-based processing
- Update prefetchMetadataObjects and addMetadataToAudio for simplified and more robust metadata extraction
- Add taglib.worker.ts for audio metadata processing in a worker
- Implement getMetadataWithTagLib function
- Auto-fix linting issues and remove unnecessary debugger statements
2026-03-09 00:35:20 +00:00
Julien Maille
c7b1d301db fix: linting errors and settings structure cleanup 2026-03-08 19:42:26 +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
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
SamidyFR
60d61f74d2 style: auto-fix linting issues 2026-03-06 21:01:28 +00:00
Timur Cravtov
4e174297ca fix: move mvhd tag to run before udta guard 2026-03-06 22:40:05 +02:00
Timur Cravtov
6545b31388 feat(library): estimate flac and mp4 duration 2026-03-06 22:19:58 +02:00
Timur Cravtov
8c7a7547c9 feat(library): estimate mp3 files duration 2026-03-06 22:19:40 +02:00
Daniel
8035dd3873
feat(downloads): add BPM tag to Vorbis comments and MP4 metadata
- Added 'TEMPO' tag to Vorbis comments if BPM is available
- Added 'tmpo' tag to MP4 metadata if BPM is available
2026-03-02 21:38:16 +00:00
Daniel
82ca593894
fix(downloads): fix malformed m4a user atoms 2026-03-02 21:14:15 +00:00
Daniel
6c09793276
feat(downloads): add XID ISRC tag to MP4 metadata
- Added 'xid ' tag for ISRC in createMp4MetadataAtoms function
2026-03-02 19:13:18 +00:00
Daniel
c430a5bd7e
fix(downloads): fix malformed m4a replaygain metadata 2026-03-02 17:59:05 +00:00
Daniel
2b2f61d1ee
feat(downloads): write replaygain to m4a tracks 2026-03-01 23:57:33 +00:00
edidealt
de3e125bac
Merge pull request #261 from ericdaddario02/feature/replay-gain-flac
feat(downloads): save replay gain tags to FLAC metadata
2026-03-01 12:15:00 +02:00
Eric D'Addario
39206f4128 feat(downloads): save replay gain tags to FLAC metadata 2026-02-28 16:03:45 -05:00
Daniel
120073aea4
fix(downloads): write full track title to metadata 2026-02-28 16:55:37 +00:00
edidealt
72eae8f411 style: auto-fix linting issues 2026-02-28 11:18:26 +00:00
Daniel
dcf8563254
feat(downloads): add explicit content rating support
- Write ITUNESADVISORY for FLAC
- Write rtng for M4A
- Read the corresponding values from local media
2026-02-28 02:49:13 +00:00
SamidyFR
4aaffd2c22 style: auto-fix linting issues 2026-02-26 23:19:38 +00: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
EduardPrigoanaAlt
6b55fd4c7a style: auto-fix linting issues 2026-02-22 15:47:05 +00:00
GooglyBlox
747f50f564 feat: add all artists to metadata 2026-02-21 18:31:43 -08:00
Julien Maille
400197aabc Write disc number metadata for FLAC and M4A downloads 2026-02-21 23:52:33 +01:00
JulienMaille
384dd867cd style: auto-fix linting issues 2026-02-21 10:35:52 +00:00
Julien Maille
2bd42fc202 feat: add ISRC and copyright metadata support for M4A downloads 2026-02-21 10:30:17 +01:00
SamidyFR
9b269d14fd style: auto-fix linting issues 2026-02-20 19:09:51 +00:00
Samidy
61da5c47b0 cover images on local files ⁉️ 2026-02-20 21:57:17 +03:00
BlackSigkill
50834a48e0 fix all errors/warnings during linting 2026-02-03 15:20:50 +01: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
Julien Maille
a6736d571f IMP: card three dot menu 2026-01-25 21:43:09 +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
a1498548a8 Home page change-up, shuffle like, self-host + improvements & fixes 2026-01-17 22:40:43 +03:00
JulienMaille
bae0d0a170 style: auto-fix linting issues 2026-01-16 20:37:51 +01:00
Julien Maille
993698b666 FIX: file extension on firefox 2026-01-16 18:35:32 +01:00
Julien Maille
bfbc0fa328 WIP: add metadata 2026-01-16 18:35:32 +01:00
SamidyFR
2c0ca538d1 style: auto-fix linting issues 2026-01-13 20:26:13 +00:00
Samidy
24f5dedcfe I HATE FIREBASE 2026-01-13 23:25:51 +03:00
JulienMaille
dc3ae80d9f style: auto-fix linting issues 2026-01-11 00:36:22 +01:00
Julien Maille
f9bd6a8fd7 fix: aac metadata 2025-12-26 14:10:06 +01:00
Julien Maille
47d64add72 Refactor cover art fetching to use centralized getCoverBlob with CORS workaround in metadata 2025-12-26 13:58:28 +01:00
Julien Maille
63854f4d69 wip add metadata 2025-12-26 13:51:04 +01:00
Eduard Prigoana
8ebc1542d5 lastfm integration 2025-10-21 18:18:03 +03:00
Eduard Prigoana
2a708e2b99 themes! 2025-10-19 18:33:41 +03:00