Commit graph

53 commits

Author SHA1 Message Date
Samidy
0bd2f29bce
Merge branch 'main' into feature/android-background-audio 2026-04-13 15:43:24 +03:00
binimum
2827184fed
bump am-lyrics and add robust isrc input 2026-04-11 11:51:53 +00:00
Simone Ianniciello
56f8620505 feat(player): use @capgo/capacitor-media-session for android compatibility 2026-04-10 17:25:10 +02:00
a
96f670affb
fix scrolling (#533) 2026-04-08 12:41:44 -04:00
edideaur
7df10b0f5e
oh my god bruh 2026-04-05 19:41:57 +00:00
edideaur
b994532def
ah 2026-04-05 18:47:11 +00:00
binimum
995906f572
refactor: optimize image loading and enhance performance
- Removed unnecessary preconnect link to jsDelivr in index.html.
- Added lazy loading to contribs in app.js for improved performance.
- Implemented dynamic loading of am-lyrics and shaka based on image loading status to reduce lcp
- Introduced waitForImagesLoading function in player.js to ensure all images are loaded before initializing the player
- Enhanced image loading attributes in ui.js to include fetchpriority based on loading strategy.
- Updated package.json to include vite-plugin-purgecss for CSS optimization
- Configured Vite to use purgecss and enabled tree-shaking in vite.config.ts to reduce bundle size
2026-04-05 17:21:10 +00:00
binimum
8a377d5332
chore(player): log preload load errors 2026-04-04 20:36:41 +00:00
Daniel
3acbcd61f2 Adjust linting rules and add vs code extension recommendations 2026-04-04 01:37:47 +03:00
Daniel
4a9493fb72 feat(dev): add vite-bundle-visualizer
This will run on build, and automatically generate a bundle-stats.html file in the assets folder containing details about package sizes
2026-04-03 20:39:15 +03:00
Daniel
51e5e1973f fix: update taglib-ts 2026-04-03 14:31:19 +03:00
Daniel
b94a832d2e feat(vitest): add vitest config and tests
Add tests for HiFi, ffmpeg, and download api functions.
2026-04-01 12:46:30 -05:00
Samidy
8ed52d8843 Bye Bye Desktop App 2026-03-29 13:09:32 +03:00
Samidy
4e75a734a2 remove qobuz 2026-03-27 14:30:39 +03:00
Daniel
2440939f4b refactor(hifi): update HiFi.ts to add trackManifests route and refactor 2026-03-23 13:42:03 -05:00
binimum
c6f82bbac2
Fix lockfile 2026-03-22 20:11:48 +00:00
binimum
98cc3b9391
Merge branch 'main' of https://github.com/monochrome-music/monochrome 2026-03-22 20:11:37 +00:00
binimum
d783642401
feat: add Atmos support, use new API endpoint, streamline API caching 2026-03-22 20:08:30 +00:00
Daniel
b546d6a4c0 bun lock update 2026-03-22 14:06:46 -05:00
Daniel
4e2a595504 refactor(hls/dash): externalize hls.js and dashjs to reduce initial bundle size 2026-03-19 15:34:51 -05:00
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
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
binimum
d09b830ee3
fix(dependencies): update bun.lock 2026-03-13 20:00:38 +00:00
Samidy
f513ce27e4 feat(unreleased): lyrics on unreleased 2026-03-13 02:58:57 +03:00
Daniel
a36ae22f4f
feat: add blob-url support and integrate blob asset plugin for Vite 2026-03-12 22:34:37 +00:00
edideaur
ed6753d15e Update lockfile 2026-03-12 19:37:27 +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
Daniel
9226515bcf
feat: update client-zip to version 2.5.0 and adjust import in bulk-download-writer.ts 2026-03-12 14:46:52 +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
Samidy
51b88cc5e8 cdn to package for am-lyrics 2026-03-12 09:00:27 +03:00
Daniel
de472c5891
Merge remote-tracking branch 'upstream' into taglib-wasm 2026-03-09 02:43:12 +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
Samidy
83c705a60a Merge branch 'main' of github.com:monochrome-music/monochrome 2026-03-09 03:03:59 +03:00
Julien Maille
b8a761d5c8 chore: update bun.lock to fix CI failure 2026-03-08 19:55:54 +01:00
Samidy
e3f781d588 feat(covers): animated covers 2026-03-08 05:27:20 +03: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
1173388ee3 fix(packaging): patch taglib-wasm issues 2026-03-08 01:54:55 +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
Samidy
6067c893a8 die 2026-03-07 08:07:17 +03:00
edideaur
6db0923d20 update lockfiles 2026-03-06 20:09:44 +00:00
edideaur
8f945c8fd7 try wrangler.toml again 2026-03-06 09:59:14 +00:00
edideaur
9e5332d953 remove wrangler 2026-03-06 09:35:26 +00:00
edideaur
720cad4bbb upload function using catbox cause imgur just got taken down LMAO 2026-03-06 09:26:02 +00:00
edideaur
828e192362 fix visualizers 2026-03-06 08:43:53 +00:00
edideaur
03ea16ac04 fix settings > system issue 2026-03-05 17:32:53 +00:00
edidealt
5cac487c0f pitch shit 2026-03-01 10:52:03 +00:00
Samidy
0fd5ad9c58 chore(deps): update dependencies 2026-03-01 02:11:52 +03: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
Julien Maille
ca3962c140 build: fix CI linting errors and update lockfile 2026-02-10 11:19:20 +01:00