code wiki / (root) / nx_galx_vidindex_nas.nx

nx_galx_vidindex_nas.nx

buildroot/runtime/nx_galx_vidindex_nas.nx

4906 B93 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic galx
docsdependenciesstructsconstsfunctions

about

nx_galx_vidindex_nas.nx -- NAS-NATIVE recordings reindex (operator 2026-06-23: "investigate and resolve"). ROOT CAUSE FOUND: the gallery's video catalog pointed at /volume1/logging/#recycle/<model>/*.ts (the Synology TRASH) while the LIVE recordings are at /volume1/logging/<model>/*.ts -> serve 404s on every video. This runs ON THE NAS (via nx_nas_run): scans /volume1/logging natively (sys_getdents64), SKIPS #recycle + @eaDir + .trickplay, writes the fresh catalog to a .new STAGING file (reversible; promote after verify). NAS-native /volume1/... paths = exactly what the serve opens. No sh. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_galx_vidindex_nas.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_openat_wr vi_p sys_write sys_exit sys_mmap vi_walk sys_openat_rd sys_mmap ↻ vi_len sys_getdents64 dirent_reclen dirent_type dirent_name vi_is_vid vi_len ↻ sys_write ↻ vi_is_trick vi_len ↻ vi_walk ↻ sys_close sys_close ↻ vi_n nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

9const VI_MAGIC_2048: i64 = 2048
11const GBUF: i64 = 65536
12const VI_SCAN: *u8 = "/volume1/logging"
13const VI_SCAN2: *u8 = "/volume1/logs" // 2026-07-11: the SECOND recordings tree (29.3 TB / ~14k .ts) was never indexed
14const VI_OUT: *u8 = "/volume1/ai/galx/knowledge/status/galx_vid_paths.tsv.new" // STAGING; promote after verify

functions

16func vi_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
21func vi_n(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
22func vi_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
23func vi_is_vid(name: *u8) -> i64
called by 1: vi_walk calls 1: vi_len
33func vi_is_trick(name: *u8) -> i64
called by 1: vi_walk calls 1: vi_len
41func vi_walk(dir: *u8, depth: i64, outfd: i64, cntp: *i64) -> i64
82func main(argc: i64, argv: *i64) -> i64