Organization Profiles
Organization profiles define the output folder, filename, sidecar, apply, collision, and metadata rules for downstream apps.
As of v0.2.6, output profiles are persisted app records. Operators can create profiles from Settings -> Profiles and attach them to managed-output roots. Configured-root scans and completed-download imports select a saved profile by media kind before creating organization plans. Approved copy-only apply prefers the selected profile managed-output root.
Current Profile Controls
Profile records store:
- Name.
- Profile kind: Audiobookshelf, Grimmory, staging, archive, or custom.
- Media kind: ebook, audiobook, or mixed.
- Managed-output root association.
- Apply policy: manual, auto-safe, or auto.
- Collision policy: review, skip, rename, replace, or merge folder.
- Sidecar policy: none, optional, or required.
Empty installs keep using the conservative Audiobookshelf dry-run fallback until an operator creates output profiles.
Audiobookshelf Profile
Audiobookshelf documentation indicates that books are grouped by folders and that files inside a book folder become one item. A friendly default output should support:
- Author folder.
- Optional series folder.
- Title folder with configurable year, sequence, subtitle, and narrator.
- Narrator in curly braces when used in folder names, for example {Narrator Name}.
- Disc folders named like Disc 1, CD 2, or Disk 3 when needed.
- OPF sidecars, cover images, descriptions, and narrator sidecars where useful.
- API-triggered library scan after approved organization.
Grimmory Profile
Canonical Grimmory documentation is https://grimmory.org/docs. The first Grimmory ebook profile targets Book Per File mode, uses author folders, places series details in filenames, chooses one normalized ebook output per book, and plans MOBI/AZW/AZW3 sources as future EPUB conversion operations. JSON and cover sidecar destinations can be planned, but sidecar generation is deferred until metadata and cover handling are stronger.
Create managed-output roots before attaching them to profiles. Ebook-focused Grimmory profiles should point at ebook managed-output roots. Audiobookshelf profiles should point at audiobook managed-output roots.
Current Planner and Apply Behavior
The organization planner lives in internal/organization.
Current behavior:
- Builds Audiobookshelf-style and Grimmory-style dry-run plans from scanner candidates.
- Selects a configured output profile by scan media kind when one exists.
- Uses author folders and optional series folders for Audiobookshelf plans.
- Preserves audiobook disc folders as Disc N.
- Uses Grimmory Book Per File author folders for ebook plans.
- Plans copy-shaped operations for media and sidecar files.
- Marks every planned operation as non-destructive.
- Routes duplicate candidates to review.
- Routes weak metadata candidates to review.
- Routes partial downloads, unsupported files, and sidecar-only candidates to hold.
Persisted organization plans use organization_plans and organization_plan_actions. Review and apply state use:
- organization_action_reviews: pending, approved, rejected, or blocked action state.
- organization_apply_operations: audit records for copy attempts, status, errors, retry count, and timestamps.
Apply remains manual, copy-only, no-overwrite, and audited.