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

@ -13,11 +13,17 @@
#include "naut/bitfield.h"
#include "naut/worker.h"
#include <stdio.h>
typedef struct naut_download naut_download;
naut_download *naut_download_create(const naut_metainfo *mi, naut_storage *st);
void naut_download_destroy(naut_download *d);
/* Scan existing storage and mark SHA-1 verified pieces complete before
* requesting from peers. Invalid or missing pieces are left for download. */
naut_err naut_download_resume(naut_download *d);
/* Optional hash offload. Completed-piece SHA-1 jobs run on the worker pool;
* naut_download_poll() finalizes verified pieces on the owning engine thread.
* The pool must outlive the download. */
@ -90,4 +96,11 @@ uint64_t naut_download_bytes_done(const naut_download *d);
size_t naut_download_piece_states(const naut_download *d, uint8_t *out,
size_t capacity);
/* Diagnostic: write a human-readable dump of block-assembly state to `out` —
* overall progress plus, for every piece not yet verified, how many of its
* blocks have arrived and how many requests are outstanding. Pairs with
* engine_dump_torrent() (which covers piece selection across peers) to
* investigate pieces that never finish downloading. */
void naut_download_dump(const naut_download *d, FILE *out);
#endif /* NAUT_PIECE_H */