Now implements streaming download+decryption entirely in Rust:
- Added reqwest/tokio/futures-util dependencies
- Created StreamingDecryptor for chunk-by-chunk decryption
- New download_and_decrypt_track command streams to disk directly
- Frontend simplified to single invoke() call
Cover art lookup was constructing paths from raw metadata without
sanitization, causing "No such file or directory" errors for artists
with special characters (e.g. "Au/Ra" looked for "Au/Ra/" but files
were saved to "Au_Ra/"). Now uses sanitizeFilename() to match the
actual on-disk folder structure created during downloads.
Playlist downloads were not fetching album cover URLs, causing both
embedded cover art and folder cover.jpg files to be skipped. Queue
manager now fetches album data on-demand (only when cover art is
enabled) to get cover URLs, reusing the same logic as individual track
downloads. Fetches track data first if albumId is missing.
("Track token has
no sufficient rights on requested media").
Previous behavior:
- Only tried format fallback (FLAC → MP3_320 → MP3_128)
- Used same track token for all format attempts
- Failed when error 2002 occurred even if alternative tracks existed
New behavior:
- When error 2002 occurs, fetches FALLBACK.SNG_ID and gets fresh token
- Retries with same format but different track ID
- Loops through all alternative track IDs before trying format fallback
- Only after exhausting alternatives does it fall back to lower quality formats
Add support for selecting a fallback audio format if the requested
track format is unavailable. Users can now choose to fall back
to MP3_320, MP3_128, or the highest available format, or opt to fail
if the requested format is not found. The queue manager and downloader
now fetch fresh track data just-in-time, handle dz fallback
parameters, and ensure the correct track ID is used for decryption.
Settings UI and store are updated to allow configuring the fallback format.
Add logic to find and use album cover art as a fallback when playlist
cover art is missing, both for local and online playlists. Update
database schema and upsert logic to store album picture URLs for
online tracks. Improve UI to display fallback cover art when needed.
The JavaScript blowfish-node library had a critical bug where it would
sometimes return 2047 bytes instead of 2048 during decryption, causing
byte alignment issues that corrupted FLAC audio at specific intervals
(~every 32/82 seconds).
Changes:
- Add Rust dependencies: blowfish, md5, byteorder
- Implement new module in Rust with proper Blowfish CBC
- Add decryption Tauri command
- Update frontend to call Rust decryption instead of JavaScript
- Remove buggy JavaScript blowfish implementation
- Update decryption algorithm (6144-byte windows)
Add ability to download entire playlists as M3U8 files, with UI
integration and per-track download actions. Implement track existence
checking to avoid duplicate downloads, respecting the overwrite setting.
Improve queue manager to sync downloaded tracks to the library
incrementally. Refactor playlist parsing and metadata reading to use the
Rust backend for better performance and accuracy. Update UI to reflect
track existence and download status in playlist views.
BREAKING CHANGE: Deezer playlist and track download logic now relies on
Rust backend for metadata and new existence checking; some APIs and
internal behaviors have changed.
Introduce database schema and types for caching online playlist tracks. Add functions to upsert and retrieve playlist tracks
from the cache. Implement a new Svelte page for viewing individual
playlists, including favorite tracks, with UI for track listing and
playlist info. Update the main service page to support
double-click navigation to playlist details.
Add ability to fully clear cached online library by deleting and recreating the database file.
Integrate new Clear Cache option in settings UI, which restarts the app after clearing.
Remove unused artist/album fields from cache and UI. Add process plugin for relaunch.
- Add id3 and metaflac crates for native audio tagging
- Create tagger.rs with separate tag_mp3() and tag_flac() functions
- Implement tag_audio_file Tauri command for unified tagging interface
- Support full metadata: title, artist, album, track#, ISRC, BPM, lyrics, cover art
- Create TypeScript wrapper (tagger.ts) for calling Rust backend
- Update downloader.ts to use Rust tagging for both MP3 and FLAC
- Remove browser-id3-writer dependency (no browser FLAC support)
- Inline lyrics parsing in addToQueue.ts (no longer needed in tagger)
Introduce metadata handling for online downloads:
- Embed cover art and lyrics (synced/unsynced) into MP3 files
- Save cover art to album folders and .lrc lyric files as sidecars
- Fetch and parse album/track metadata and lyrics from Deezer API
- Add user settings for artwork and lyrics embedding, LRC export, and cover quality
- Refactor queue manager to run continuously in background