Skip to main content

Music Library

@magistr/music-libraryv2026.07.07.1· 9d agoMODELSREPORTS
01README

Multidimensional music library catalog built WITHOUT touching the filesystem: the inventory and raw tags come from an existing gonic scan index (gonic.db, read over SSH with sqlite3 -json -readonly), so no array disk is ever woken by a directory traversal.

On top of the raw rows the scan method builds a star-schema cube:

  • facts — one album resource per album directory (album → disc → track nesting, disc subdirs like CD1/ collapsed into their parent album)
  • dimensions — one artist resource per artist (name variants, album refs, genre/format/year span) plus rollup dimension resources for genres, years/decades, formats, and quality buckets (lossless / lossy-high / lossy-mid / lossy-low)
  • cross-cuts — an issues resource (untagged tracks, dirname-only albums, encoding fixes with before/after, DOS-mangled 8.3 names) and a library summary with totals and source breakdown

Every tag string passes through encoding recovery: legacy single-byte tags decoded as latin1 (cp1251 / koi8-r / cp866 / windows-125x / CJK mojibake such as "Êëàóäèî Ìîíòåâåðäè") are detected with jschardet and re-decoded; double-encoded UTF-8 is unwrapped. Tracks with missing tags fall back to directory/filename naming patterns ("1983. Artist - Album", "Artist - Album (Year) [FLAC]", "NN - Title", disc subdirs, bracketed artists, catalog-number prefixes).

The probe method deep-probes one file with ffprobe inside a docker container that has the music share mounted (all formats ffmpeg knows: mp3, flac, opus, m4a, ogg, ape, wma, wav, …), merging format-level and stream-level tags and reporting the encoding-fix trace — for debugging individual files.

02Release Notes

Release 2026.07.16.2 — align model versions with manifests

Maintenance release across the @magistr extensions. For most packages this carries no functional change: the only edit is the model's version: field, brought back in line with its manifest version so the published model type version and the package version no longer drift.

Functional changes in this release are limited to:

  • anime-cron: normalizeTitle now strips a ": subtitle" suffix and a trailing parenthesized year before comparison, fixing dedup false-misses where the torrent title carries a subtitle or year that the AniList romaji does not.

  • arckit: first publish. Standalone ArcKit port — a 12-phase architecture governance state machine with 65 bundled templates, driven by a bundled skill.

Also tracks three extensions (kaiten, observability-agent, music-library) that previously existed only as untracked working-tree directories, recovered from stashes.

03Models1
@magistr/music-libraryv2026.07.07.1extensions/models/music_library.ts

Global Arguments

ArgumentTypeDescription
hoststringHost with the music share (unraid)
sshUserstringSSH user
fn scan()
Build the multidimensional catalog from the gonic index: album facts, artist/genre/year/format/quality dimensions, issue worklists
fn dupes()
Find duplicate albums (same artist+title in different dirs, with a keep-best hint and reclaimable bytes) and duplicate tracks (same artist+title, near-equal duration)
fn verify()
Check playback integrity by decoding files with ffmpeg inside the container: full decode, or quick tail decode (seeks near the end using the indexed duration) — reports unreadable, corrupt, and truncated files
fn probe()
Deep-probe one file with ffprobe (inside the container): full tags in all encodings, codec, sample rate — for debugging tag/encoding issues

Resources

library(infinite)— Library summary with dimension cardinalities
album(infinite)— Album fact: one directory with its discs and tracks
artist(infinite)— Artist dimension: albums, genres, formats, year span
dimension(infinite)— Rollup dimension (genres / years / formats / quality)
issues(infinite)— Data-quality worklists: untagged, dirname-only, encoding fixes
dupes(infinite)— Duplicate album and track clusters with keep/reclaim hints
verify(infinite)— Playback-integrity report: decode results, corrupt/truncated files
probe(infinite)— Deep ffprobe result for a single file
04Reports1
@magistr/music-verify-triagemodel
extensions/reports/verify_triage.ts

Triage of the latest playback-verification run: unreadable files, truncation split by cause, systematically damaged albums (with healthy-duplicate hints from the dupes resource), lossless corruption, and isolated glitches.

musicverifyintegritytriage
05Stats
A
100 / 100
Downloads
0
Archive size
215.2 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels