code wiki / _hdl_build / nx_ia_resolve.nx
nx_ia_resolve.nx
buildroot/runtime/_hdl_build/nx_ia_resolve.nx
about
nx_ia_resolve.nx -- resolve an archive.org /details/ page to the actual media file URL via the sanctioned
public /metadata/ API. A details page is an HTML viewer that loads the media by JS, so a static fetch archives
the PAGE, not the movie. This fetches https://archive.org/metadata/<id> (small JSON), reads the top-level
"server"+"dir" and the .mp4 (h.264 derivative) filename from "files", and builds the direct download URL. The
search engine / archive daemon calls this before preserving an archive.org item. license_tier: ORIGINAL
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_browser_fetch.nx
imported by: nx_archive_daemon.nxnx_ia_probe.nx
structs
| none |
consts
| 9 | const K_MAGIC_1024: i64 = 1024 |
| 10 | const K_MAGIC_4194304: i64 = 4194304 |
| 11 | const K_MAGIC_2048: i64 = 2048 |
functions
| 13 | func ia_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: ia_json_str |
| 14 | func ia_puts(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off]=s[i];off=off+1;i=i+1} return off } called by 1: ia_resolve |
| 15 | func ia_find(hay: *u8, hl: i64, needle: *u8, nl: i64, from: i64) -> i64 |
| 20 | func ia_identifier(url: *u8, ulen: i64, out: *u8, cap: i64) -> i64 |
| 29 | func ia_json_str(json: *u8, jlen: i64, keyq: *u8, out: *u8, cap: i64) -> i64 |
| 39 | func ia_find_mp4(json: *u8, jlen: i64, out: *u8, cap: i64) -> i64 |
| 58 | func ia_urlencode(s: *u8, slen: i64, out: *u8, cap: i64) -> i64 |
| 72 | func ia_resolve(details_url: *u8, ulen: i64, store: *TrustStore, cr: *u8, pk: *u8, now: i64, out_url: *u8, cap: i64) -> i64 |