Commit graph

80 commits

Author SHA1 Message Date
Daniel
e2a09b9b32 refactor: externalize svg images and add new vite plugin
The plugin runs all imported SVG files through svgo.

For index.html, you can use the following syntax:
```html
<use svg="file.svg" size="24" />
```

For scripts, use the `?svg` import query
```javascript
import SVG_FILE from './file.svg?svg&size=24
```

Note: size is shorthand for specifying both width and height individually.  You can also set any property of the base SVG element.

You can also use the `?svg&icon` query to return a function that allows dynamically resizing the SVG string.
2026-03-19 15:28:33 -05:00
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
2a4136a5f6 fix(downloads): progress index now shows correct track number in bulk download 2026-03-19 15:07:28 -05:00
Daniel
a4d92b0759
feat(downloads): implement SequentialFileWriter for individual file downloads 2026-03-12 20:47:48 +00:00
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
b31be7dc80 Fix bulk download edge cases and improve robustness
- FolderPickerWriter: throw AbortError on cancel instead of returning null
- FolderPickerWriter: add try/catch with abort() to release file locks on failure
- ZipNeutralinoWriter: move writeBinaryFile after response.body validation
- bulkDownloadSettings: migrate legacy key and validate stored values
- download-utils: catch ffmpeg cancellation via signal.aborted
- downloads.js: use consistent Neutralino detection with bridge module
- download-utils: use strict equality for flac extension check
2026-03-12 19:35:23 +00:00
Daniel
b04019f282 fix(downloads): mp4 files with flac audio are now tagged
This is resolved by using ffmpeg to copy the audio data into a new mp4 container file before passing it to taglib.
2026-03-12 06:43:45 +00:00
Daniel
c1552980eb feat: extract bulk download handlers into bulk-download-writer.ts and add folder picker + settings 2026-03-12 06:04:59 +00: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
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
0ed82f586c
didnt get it all lol 2026-03-12 05:59:20 +03:00
Daniel
4def7b8e51
Merge branch 'combined-fixes' into copilot/fix-m3u-generation-logic 2026-03-11 15:20:30 -05:00
Daniel
7448ddce1e feat(downloads): add FLAC - Max Compression option and refactor transcoding logic 2026-03-11 15:18:39 -05:00
Daniel
2db782d74f feat(downloads): add custom download formats 2026-03-11 15:18:39 -05:00
Daniel
e1d7744ab2 fix: correct total tracks per disc and add total discs to metadata for multi-disc albums 2026-03-11 15:17:17 -05:00
Daniel
aa728f970b
feat(downloads): add discNumber template for file name.
Also update disc number handling in download logic and metadata extraction
2026-03-11 20:10:38 +00:00
Daniel
8cf7979d47
fix(downloads): cue generation now properly outputs correct tracks numbers and splits by disc 2026-03-11 20:00:44 +00:00
Daniel
3ef50cb6ce
fix(downloads): fix m3u generation artist [object Object] bug and mismatched file extensions 2026-03-11 04:50:53 +00:00
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
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
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
9ff62c52d4
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-28 02:00:37 +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
Daniel
353ced831b
fix(downloads): handle MP3_320 format in bulk downloads 2026-02-27 20:32:19 +00:00
JulienMaille
651f4282e5 style: auto-fix linting issues 2026-02-21 23:33:29 +00:00
Julien Maille
bf346f756e Add multi-disc ZIP folders and fix playlist extension paths 2026-02-22 00:32:45 +01:00
Eduard Prigoana
58b77e904b fix codeql stuff 2026-02-18 03:17:37 +00:00
Julien Maille
db66767dde BREAK IT: the damn auth login (and fix neutralino downloads too) 2026-02-15 20:08:47 +01:00
Eduard Prigoana
60b60bd8fa remove dead apis, search in settings, playbar dragging 2026-02-05 20:42:15 +00:00
EduardPrigoana
5b6d44b91e add support for m3u, m3u8, CUE, json and NFO while downloading 2026-01-31 23:32:55 +02: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
a1498548a8 Home page change-up, shuffle like, self-host + improvements & fixes 2026-01-17 22:40:43 +03:00
JulienMaille
46240b85e2 style: auto-fix linting issues 2026-01-16 22:38:54 +01:00
Julien Maille
780eee8808 feat: implement memory-efficient bulk downloads with user toggle and client-zip 2026-01-16 22:38:54 +01:00