Commit graph

11 commits

Author SHA1 Message Date
Breadway
f0138cf59b Pin bread-onnx and bread-utils to bread-ecosystem v0.7.2
All checks were successful
dev release / build (push) Successful in 2m41s
2026-08-15 22:53:46 +08:00
Breadway
7e1b7450cf Fix TUI Add flow landing new movies/shows flat in the library root
add_selected_search_result passed the raw configured default_root_folder
straight through as root_folder for both movies and series, with no
per-item subfolder computed. import_one/season_dir both expect
root_folder to already be the item's own folder, so new grabs landed
directly in the shared library root instead of their own folder,
invisible to Jellyfin's per-category libraries. Split default_root_folder
(series) from a new movies_root_folder, and have the TUI build the
"{Title} (Year)" subfolder itself before sending the add request.
2026-08-05 19:02:27 +08:00
Breadway
109b29ee55 Continue transcode/import feature work and fix bugs found by audit
These four files mix two things too interleaved to commit separately:
in-progress work on anime pipeline tuning (quality/preset/thread
config, per-pipeline parallelism caps), sampled decode verification,
and subtitle-codec-aware remuxing that predates this commit, plus a
set of correctness fixes from an independent Opus 5 review applied
directly on top of it:

- Attached-pic (cover art) streams could be probed as the real video
  stream when they came first, silently replacing the actual
  codec/height (ffprobe.rs)
- probe_failed rows (null codec/height) were enqueued for transcode
  and could never be claimed again, due to the unique partial index -
  should_enqueue now rejects them
- tokio::try_join! cancelled the sibling pipeline's in-flight
  spawn_blocking encode on the first Err instead of letting it finish
- Duplicate episode_file rows for the same media only had one swept on
  an upgrade swap, leaving stale rows/files behind
- File-swap and DB-write on transcode completion weren't atomic;
  wrapped in a transaction and made probe-refresh failure non-fatal
- In-progress transcode temp files were visible to library scans
  (video extension, no dotfile prefix) and could get imported mid-encode
- Remux temp files leaked on error paths; a Jellyfin refresh failure
  failed the whole import cycle instead of just logging
- insufficient_space could false-positive when the download and
  library dirs are on the same filesystem (rename is free there)
- Config validation for reference_height and min_size_reduction_pct,
  which previously could silently divide-by-zero or overflow deep
  inside an encode
2026-08-03 08:43:50 +08:00
Breadway
576aad3bfe Fix a real production incident: unbounded concurrent transcode encodes
The daemon's steady-state transcode ticker and a manually-launched
transcode-library backfill process were both independently claiming
pending jobs from the same queue with no shared concurrency
awareness, each capping only at its own parallelism_max. Combined
with large files easily outlasting the 30s poll interval, this
stacked to 20+ simultaneous GPU encode/decode sessions and triggered
the kernel OOM killer on a shared 15GB host running a dozen+ other
containers (confirmed via dmesg; no services were lost, no library
files were touched — the original-file-safety design held under the
crash).

Fixes: claim_pending_jobs now treats its limit as a total concurrency
cap (subtracting already-running jobs, wrapped in a BEGIN IMMEDIATE
transaction so this is correct across concurrent processes touching
the same database, not just within one). Added reset_orphaned_running_jobs,
called on real daemon startup, so a crash never permanently strands
job slots in 'running'. Lowered the default parallelism_max from 4
to 2 given the observed real-world memory pressure.
2026-07-25 00:20:05 +08:00
Breadway
d533301880 Add native GPU-accelerated AV1 transcode capability
Post-grab async background swap, upgrade_locked flag to prevent the
upgrade loop from re-inflating a locally-transcoded file, and a
transcode-library CLI backfill for the existing catalog. Bitrate model
calibrated against Silicon Valley's real HEVC bitrate, scaled by
resolution and AV1's encoding efficiency. HDR/2160p and anime excluded
from this first pass. Jellyfin session polling throttles batch
encoding back to 1 stream during active playback.
2026-07-24 23:57:58 +08:00
Breadway
691fb39cbb Add grab_enabled kill switch for the passive RSS grab loop 2026-07-24 23:20:43 +08:00
Breadway
6e7be67f0b Overhaul breadarr-tui UX: filter/sort, color, help overlay, cross-nav
Library tab gets a cycling filter (all/series/movies/missing/unmonitored)
and sort (title/missing/kind), color-coded kind tags and missing-count
severity, and monitor-toggle without opening detail. Keybinding hints move
out of cramped block titles into a context-aware status bar plus a `?`
help overlay, both driven by one shared keybinding table so they can't
drift apart. Episode status icons and review-queue confidence get the same
severity coloring. Stuck tab gains real selection/focus and can jump
straight to a show's Library detail (needed adding media_item_id to
StalledGrab's query — the one small backend touch in this pass). Adds a
manual refresh-now key.
2026-07-21 20:55:04 +08:00
Breadway
9d8a59e3a8 Switch to tag-pinned bread-ecosystem deps; bump version to v0.1.0 2026-07-19 03:53:09 +08:00
Breadway
bb4576915e Switch to tag-pinned bread-ecosystem deps; bump version to v1.0 2026-07-19 03:27:37 +08:00
Breadway
830e80622e Fix literal-tilde fallback bug in breadarr-shared's expand_home
expand_home() fell through to PathBuf::from(input) — the literal,
unexpanded "~/..." string — whenever the HOME env var itself wasn't set,
same bug class as breadclip-core/breadpad-shared/breadmon (found during
this pass's own crate-migration sweep, in a different shape here: the bug
was in this crate's own tilde-expansion helper rather than a
dirs::xxx().unwrap_or_else() chain). Fixed via bread_utils::xdg::home_dir,
which resolves a real home directory before ever needing to fall back.

Builds and tests clean: 205 passed, 1 pre-existing network-dependent test
ignored, 0 failed.
2026-07-17 10:13:06 +08:00
Breadway
697b009627 can't be bothered writing a commit message 2026-07-16 22:22:53 +08:00