nautd/webui: scripting, labels, settings, set-location, pause fix

Session checkpoint on webui-plugin:
- engine dump (nautctl dump) + engine endgame integration
- per-file move locations persistence; torrent-level "Set location"
  with reset/keep-relative/leave-separate handling + residual prune
- Lua: naut.get_labels, define_settings/get_setting (script_host struct)
- daemon-owned labels (category+tags) + taxonomy persistence; webui write-through
- fix: pausing a completed/seeding torrent now sticks (stop wins over result)
- automation tab responsive layout; anime_sort label gating + settings

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ookami125 2026-06-21 23:19:41 -04:00
parent 6dc711cf57
commit b633b7d216
40 changed files with 3305 additions and 3267 deletions

View file

@ -108,6 +108,22 @@ int main(void) {
memcmp(got1, global + mi.files[0].length, l1) == 0);
free(got1);
/* Simulate a daemon restart: file 0 now lives at `dest`, not under `root`.
* Reopening with its saved location as an override must pick it up in place
* so resume verifies every piece -- if the override were ignored, file 0
* would open as an empty placeholder under root and resume would fail. */
const char *overrides[2] = { dest, NULL };
naut_storage_opts ropts = { .preallocate = true, .overrides = overrides };
naut_storage *st2 =
naut_storage_open_opts(mi.files, mi.num_files, root, &ropts, &err);
CHECK(st2 && err == NAUT_OK);
naut_download *d2 = naut_download_create(&mi, st2);
CHECK(d2 != NULL);
CHECK(naut_download_resume(d2) == NAUT_OK);
CHECK(naut_download_complete(d2)); /* both files verified from their homes */
naut_download_destroy(d2);
naut_storage_close(st2);
naut_download_destroy(d);
free(global); free(tor); naut_metainfo_free(&mi);
char cmd[600]; snprintf(cmd, sizeof cmd, "rm -rf '%s' '%s'", root, destdir);