Port of the Python/PyQt6 app: same library database, playlists, hero panel, lyrics, tag editor, MusicBrainz/cover tools, CD ripping, MPRIS and tray. New: right-click 'Set <tag> to "value"' writes the clicked cell's tag into every selected file (with undo). The seek bar now runs off a monotonic position clock so it can't jump back and forth. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
6.1 KiB
Mulberry
A Material You music player for Linux, written in Rust. Strawberry's library and playlists with an expressive, colour-matched "now playing" panel.
This is the Rust rewrite of the original Python/PyQt6 Mulberry (kept next to this folder as Mulberry-python).
It keeps the same look, the same library database and the same features, and fixes a few things on the way.
What's new in the Rust version
- Set tag from the right-click menu (Strawberry style). Select several tracks, right-click the Album, Artist, Title, Album artist, Genre, Composer, Year, Track or Disc cell of any of them and pick Set album to “Disclaimer II”. The value of the cell you clicked is written into the tags of all selected files immediately (FLAC, Ogg/Opus, MP3, M4A, WAV, …), the library and every open playlist update, and a toast with Undo restores the old values.
- Seek bar no longer glitches. The wavy bar used to integrate time itself and then get pulled back and forth by coarse position reports from the player (and by stale reports right after a seek). Now one monotonic clock drives everything: reports only nudge an estimate, the shown position never goes backwards, stale pre-seek reports are ignored, and the wave phase comes from absolute time. The cover is uploaded to the GPU once and drawn as a textured mesh, so nothing is rescaled per frame.
- Light on the CPU. Idle and paused means no repaints at all. While playing, animations run at the frame-rate cap
(Settings › Appearance, default 30 fps); one whole UI frame costs about 1 ms of CPU (
cargo test --release --test bench). - Single native binary (no Python, no Qt), GPU-drawn with egui, MPRIS + system tray + desktop notifications.
Install
Needs Rust, libmpv (the mpv package) and, optionally, ffmpeg, cdparanoia, yt-dlp and parec.
./install.sh # builds the release binary, installs ~/.local/bin/mulberry + menu entry + icon
./install.sh --uninstall
Arch: sudo pacman -S rust mpv ffmpeg cdparanoia yt-dlp libpulse
Your existing library (~/.local/share/mulberry/library.db), playlists, covers and lyrics cache are used as they are.
Settings are imported once from the old mulberry.conf into ~/.config/mulberry/settings.json.
Features
Look and feel
- Material 3 colour roles from your system colours (
~/.config/kdeglobalswhen present), from the album art, or from a custom seed colour; light/dark follows the system or is forced. - Hero panel: cookie-shaped spinning cover with a radial spectrum (decoded from the track itself and synced to the playback position), wavy seek bar, morphing play button, synced lyrics (click a line to seek), Large / Compact / Hidden layouts and a Focus mode (F11).
- Floating bass shape in the bottom-left corner and a block spectrum analyzer in the bottom bar.
Library and playback
- SQLite collection with an incremental background scanner; group by album artist, artist, genre, year or album;
search with
artist:album:genre:year:>2000rating:>3. - Tabbed playlists with undo/redo, multi-select, drag and drop (also from the library tree and from the file manager), column chooser/reordering/resizing, sorting, filtering, duplicate and missing-file removal, saved/pinned playlists.
- Play queue, Play next, Stop after this track, shuffle and repeat; smart playlists; play counts, skips, 0–5 star ratings.
- Import M3U/M3U8/PLS/XSPF/WPL/ASX/CUE, export M3U/M3U8/PLS/XSPF/WPL (single or all playlists).
- Gapless playback, crossfade (1–12 s), 10-band equalizer with presets, ReplayGain, output device selection, resume on start.
- YouTube, SoundCloud, Bandcamp… links (through
yt-dlp) and internet radio with now-playing titles.
Metadata
- Tag editor for one or many files with cover embedding; MusicBrainz lookup (pick a match or auto-apply the best);
cover manager (iTunes, Deezer, Cover Art Archive, Last.fm); synced lyrics from LRCLIB, NetEase, embedded tags or
.lrcfiles. - Last.fm scrobbling, now-playing and Love (offline cache); ListenBrainz.
Audio CD: drive detection, TOC, MusicBrainz lookup, playback and ripping (cdparanoia + ffmpeg to FLAC/ALAC/Opus/Vorbis/MP3/WAV).
Desktop: MPRIS2 (media keys, Plasma/shell widgets), tray icon with close-to-tray, notifications with cover art, single instance.
Keyboard shortcuts
| Keys | Action |
|---|---|
| Space | Play / pause |
| Ctrl+← / Ctrl+→ | Previous / next |
| Alt+← / Alt+→ | Seek −/+ 10 s |
| Ctrl+↑ / Ctrl+↓, Ctrl+M | Volume, mute |
| Ctrl+D | Queue / dequeue selected |
| Ctrl+J | Jump to the playing track |
| Ctrl+F | Filter the playlist |
| Ctrl+E | Edit tags |
| Ctrl+T / Ctrl+W | New / close playlist |
| Ctrl+I / Ctrl+S / Ctrl+Shift+S | Import / export / export all playlists |
| Ctrl+Z / Ctrl+Shift+Z | Undo / redo |
| Ctrl+L | Love the current track |
| Ctrl+O / Ctrl+Shift+O / Ctrl+U | Open files / folder / URL |
| F5 / Ctrl+F5 | Update library / full rescan |
| F11 | Focus mode |
Where your data lives
| Settings | ~/.config/mulberry/settings.json |
| Library, playlists, lyrics cache | ~/.local/share/mulberry/library.db |
| Covers | ~/.local/share/mulberry/covers |
| Thumbnails | ~/.cache/mulberry |
Development
cargo run --release
cargo test --test tagwrite --test playback --test dbus # tag round trips, seek-bar clock, MPRIS/tray
MULBERRY_SCRATCH=/tmp/mb-scratch cargo test --test shots # offscreen screenshots (needs a scratch copy of the data dirs)
The UI tests render offscreen through egui_kittest (no window) against a scratch copy of the data directories, and the
tag tests only touch freshly generated files.
Layout: src/player.rs (libmpv engine + position clock), src/library.rs, src/playlist.rs, src/tags.rs (lofty),
src/spectrum.rs, src/online.rs, src/ui/* (hand-painted Material 3 widgets, hero, playlist view, sidebar, dialogs).
Icons: Material Symbols (Apache 2.0). Licence: MIT.
