connor b4f1d3ca42 Don't overwrite DB metadata with missing tag values
An untagged file blanked the title, artist and other fields that the
download had recorded. Leave a column untouched when the file has no
value for it, as was already done for the MBID.
2026-10-26 12:51:53 -04:00
2026-03-17 14:32:52 -04:00
2026-10-26 12:02:26 -04:00
2026-03-17 14:32:52 -04:00

shanty-index

Music file indexing and metadata extraction for Shanty.

Scans a directory tree, extracts embedded metadata (ID3, Vorbis comments, MP4 tags, etc.) using lofty, and upserts everything into the Shanty database. Supports incremental re-indexing via file modification time tracking.

Usage

# Scan a directory
shanty-index /path/to/music

# Dry run (no DB writes)
shanty-index /path/to/music --dry-run -vv

# Custom database location
shanty-index /path/to/music --database sqlite:///path/to/shanty.db?mode=rwc

As a library

use shanty_index::{ScanConfig, run_scan};
use shanty_db::Database;

let db = Database::new("sqlite::memory:").await?;
let config = ScanConfig {
    root: "/path/to/music".into(),
    dry_run: false,
    concurrency: 4,
};
let stats = run_scan(db.conn(), &config).await?;
println!("{stats}");
S
Description
Indexing functionality for music management in shanty
Readme
75 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 100%