Enhance comment viewer + make SponsorBlock configurable (3.6 + parity)

Comment viewer (web UI): the flat tree gains search (highlight + keep
ancestor context), sort (threaded / top / newest / oldest), per-thread
collapse/expand with collapse-all/expand-all, an OP badge for the
uploader, and a "new since last visit" highlight + count (localStorage
per-video timestamp). API now returns each comment's `timestamp` and
`author_is_uploader`.

SponsorBlock: was a hardcoded `--sponsorblock-mark all`. Now a real
setting (off / mark / remove) with a per-channel override, threaded
through the full five touchpoints — config `[backup].sponsorblock_mode`
(default "mark", preserving prior behavior), DownloadOptions override,
a downloader resolver (apply_sponsorblock), and both UIs (egui Settings
+ channel dialog; web Settings modal + channel dialog + SettingsPayload).

Integration tests extended: settings round-trip asserts the sponsorblock
default + persistence; channel-options round-trip asserts the override.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Luna 2026-06-07 03:53:49 -07:00
parent 6f174f703b
commit 3031b5b0e5
7 changed files with 219 additions and 20 deletions

View file

@ -92,6 +92,12 @@ pub struct DownloadOptions {
#[serde(default)]
pub youtube_player_clients: Option<String>,
/// Per-channel SponsorBlock override: "off" / "mark" / "remove".
/// `None` defers to the global `backup.sponsorblock_mode`. Resolved in
/// the downloader.
#[serde(default)]
pub sponsorblock_mode: Option<String>,
/// Per-channel post-download conversion mode override. `None` defers
/// to the global `[convert]` config; `Some("off")` forces no
/// conversion for this channel even when the global default is on.