Skip to main content

Module grades

Module grades 

Source
Expand description

The Audio Grading tab: SFX library grades kept in each MP3โ€™s TXXX:XIL_GRADE frame, with a persisted (size, mtime) cache so a rescan of a NAS library is one walk plus stats.

The cache file (SFX/.xil_grade_cache.json) has the Python GUIโ€™s exact format, so both dashboards share it.

Constantsยง

CACHE_VERSION ๐Ÿ”’

Functionsยง

apply_grade
Write a grade to the file, the in-memory map and the persisted cache. Only paths the last scan found are accepted.
glyph
_GRADE_GLYPH.
grade_cache_path
_grade_cache_path().
grade_of
The grade of one cached path, "" when ungraded or unknown.
is_grade
load_grade_cache_file
_load_grade_cache_file(): {rel_path: {grade, size, mtime_ns}}, empty when missing, corrupt or another version.
record ๐Ÿ”’
save_grade_cache_file
_save_grade_cache_file(files). Best-effort.
scan_sfx_grades
_scan_sfx_grades(): rebuild the in-memory grade map for every SFX/**/*.mp3, reading ID3 only for files whose size or mtime changed.
sfx_choices
_sfx_choices(grade_filter): [(glyph [show] name, path)].
sfx_dir
_sfx_dir(slug): the SFX library, scoped to SFX/{slug} when it exists.
sfx_show_label
_sfx_show_label(path, root): the per-show subdirectory, or "" for the shared pool and anything not under root.
sfx_summary
_sfx_summary().
stat ๐Ÿ”’
update_grade_cache_entry
_update_grade_cache_entry(path, grade): store the post-write stat so the next scan stays read-free.