- Rust 98.5%
- Nix 1.5%
| assets | ||
| example_macros | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
Metamusic
TUI audio tags editor written in rust.
Why This Project
The main motivation behind this project is that sometimes, when I download songs, the metadata is shitty, so my Navidrome server can’t organize them coherently. Also, the other options for editing metadata are Python slop, so here we are.
Supported Formats
- aac
- flac
- mp3
- ogg vorbis
- opus
- spexx
Supported Tags
- Title
- Artist
- Album Artist
- Album
- Date
- Track
- Disc
- Total Discs
- Date Recorded
- Date Released
- Original Date Released
- Genre
Supported Features
- Modify metadata
- Modify cover art
- Dynamic ordering
- Batch editing
- Batch track numbering
- Yank/Paste some common metadata (artist, album, album artist, year, art)
- Rename files based on pattern
- Layout customizable with config.ron
- Custom tag support
- Export album art
- Possibility to write macro in rhai
Configuration
You can customize Metamusic by editing config.ron in your config directory (e.g., ~/.config/metamusic/config.ron on Linux).
Layout
The Layout is the union of three parts:
- Components: specify the components of a layout and allow to have nested nodes (is just a tree structure).
- Direction: specify the direction of the split.
- Constraints: specify the space for every child of the node.
layout: (
direction: Vertical,
constraints: [
Length(3), // Header
Percentage(60), // Content
Percentage(40), // Bottom panel
Length(3), // Status bar
],
components: [
Header,
Nested((
direction: Horizontal,
constraints: [
Percentage(40), // Files
Percentage(60), // Right side
],
components: [
Files,
Nested((
direction: Horizontal,
constraints: [
Percentage(35), // Tags
Percentage(65), // Album Art
],
components: [
Tags,
AlbumArt,
],
)),
],
)),
BottomPanel,
StatusBar,
],
)
Custom Tags
You can add custom tags to the editor by adding them to the custom_fields list in config.ron:
(
// ...
custom_fields: [
(
name: "BPM",
key: "bpm",
),
(
name: "Comment",
key: "comment",
),
],
)
The name is what will be displayed in the TUI, and the key is the internal tag key (usually lowercase).
Modes
- File Selection: choose the song you want to modify
- Filter: search for album, artist, year, genre
- Field Selection: choose the tag you want to modify
- Track Selection: set progressive track numbers
- Editing: edit a tag
- Renaming: rename files based on a pattern
- Help: show keybinding
Renaming
You can use the following pattern:
- %n: Track
- %N: Total Tracks
- %t: Title
- %a: Artist
- %A: Album Artist
- %l: Album
- %y: Year
- %d: Disc
- %D: Total Discs
- %g: Genre
Example of pattern: [%n] %A - %t
Or you could use a regex (press Ctrl+s to have a basic regex), like with sed: s/%a/%A/g
