Go back to the hardlink deduplicator (1da0132), keeping backups

Restores the code of 1da0132 ("Add a setting to hide the quarantine from
Plex") and removes everything added after it: the tag editor, album art,
organizing/naming, the step-by-step tune-up and library types.

Kept:
- Database backups (Settings -> Backups): scheduled, manual, download,
  restore, and the optional backup before every action.
- The .env-driven docker-compose.yml for Arcane.

Databases that already ran the later migrations keep working: migrations
6-10 stay in the list (they only add columns) so numbering never goes
backwards, and Undo refuses History entries of removed features instead
of treating them as links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cdnutterandClaude Opus 5.5 committed 2026-09-30 10:43:29 -07:00
1 parent 7b180e26db
commit e0617047f7
44 files changed
+103 -10456

No files matched your search

+2 -131
View File
@@ -34,8 +34,6 @@ export type Info = {
default_extensions: string[];
dry_run: boolean;
plex_ignore: boolean;
tag_editing: boolean;
tag_fields: string[];
};
export type Job = {
@@ -50,7 +48,6 @@ export type Job = {
error: string;
results: Record<string, number>;
skipped: string[];
notes?: string[];
started_at: number;
finished_at?: number;
};
@@ -77,10 +74,6 @@ export type Pair = {
settle_minutes: number;
approx_matching: boolean;
approx_threshold: number;
auto_organize: "off" | "slave" | "master" | "both";
library_type: LibraryType;
naming: Naming;
fixer: FixerState;
last_scan_at: number | null;
last_scan_error: string;
last_scan_warnings: ScanWarning[];
@@ -101,75 +94,8 @@ export type PairInput = Pick<
| "settle_minutes"
| "approx_matching"
| "approx_threshold"
| "auto_organize"
| "library_type"
>;
export type LibraryType = "music" | "soundtracks";
// ---- tune-up (step-by-step library fixing) ----
export type FixStep = "structure" | "tags" | "folders" | "files";
export type StepStatus = { state: "" | "done" | "skipped"; at?: number; note?: string };
export type FixerState = { master: Partial<Record<FixStep, StepStatus>>; slave: Partial<Record<FixStep, StepStatus>>; link: StepStatus };
export type FixPlan = {
id: number;
side: Side;
step: FixStep;
created_at: number;
songs: number;
albums: number;
fixable: number;
blocked: number;
notices: string[];
applied: boolean;
};
export type FixItem = {
id: number;
kind: "move-folder" | "move-file" | "tags" | "album-tags" | "problem";
group: string;
from?: string;
to?: string;
why: string;
blocked?: string;
changes?: Record<string, [string, string]>;
unsure?: boolean;
};
export type MbRelease = {
id: string;
title: string;
artist: string;
date: string;
country: string;
status: string;
type: string;
disambiguation?: string;
formats: string;
track_count: number;
discs: number;
score: number;
};
export type AlbumFix = {
id: number;
folder: string;
artist: string;
album: string;
source: "musicbrainz" | "master";
release?: MbRelease;
candidates: MbRelease[];
confidence: number;
matched: number;
files: { path: string; track?: string; changes: Record<string, [string, string]> }[];
album_changes: Record<string, [string, string]>;
error?: string;
};
export type Fixer = { state: FixerState; steps: FixStep[]; plan: FixPlan | null; items: FixItem[]; albums: AlbumFix[] };
export type ProbeInfo = {
codec: string;
codec_long?: string;
@@ -195,7 +121,7 @@ export type Match = {
pair_id: number;
rel_slave: string;
rel_master: string;
kind: "path" | "path_case" | "extension" | "fuzzy" | "elsewhere" | "approximate" | "inode" | "none";
kind: "path" | "path_case" | "extension" | "fuzzy" | "elsewhere" | "approximate" | "none";
status: Status;
master_size: number;
master_mtime: number;
@@ -213,7 +139,7 @@ export type Match = {
export type Operation = {
id: number;
pair_id: number;
action: "link" | "promote" | "build" | "remove" | "rename" | "tags" | "move";
action: "link" | "promote" | "build" | "remove" | "rename";
rel_master: string;
rel_slave: string;
rel_new: string;
@@ -228,13 +154,6 @@ export type Operation = {
finished_at: number | null;
undone_at: number | null;
purged_at: number | null;
detail?: {
side?: "master" | "slave";
mode?: "replace" | "inplace";
changes?: Record<string, [string, string]>;
sidecars?: [string, string][];
art?: boolean;
};
};
export type TreeEntry = {
@@ -293,53 +212,5 @@ export type ScanWarning = {
export type FolderRename = { slave: string; master: string; ready: boolean; reason?: string };
export type Side = "master" | "slave";
export type FileEntry = { name: string; rel: string; dir: boolean; size?: number; links?: number; editable?: boolean };
export type TagFile = {
rel: string;
editable: boolean;
reason?: string;
fields: Record<string, string>;
other: Record<string, string>;
links: number;
size: number;
};
export type BackupConfig = { folder: string; interval_days: number; retention_days: number; before_actions: boolean };
export type Backup = { name: string; type: "manual" | "scheduled" | "action"; size: number; created: number };
export type Naming = {
artist_folder: string;
album_folder: string;
track_format: string;
multi_disc_format: string;
colon: "smart" | "delete" | "dash" | "space_dash" | "space_dash_space";
illegal: "replace" | "remove";
folders: FolderNaming[];
};
/** Its own naming for one folder of a library, e.g. soundtracks in "Video Games". */
export type FolderNaming = {
folder: string;
artist_folder: string;
album_folder: string;
track_format: string;
multi_disc_format: string;
};
export type OrganizeItem = { id: number; side: Side; from: string; to?: string; move: boolean; reason?: string; sidecars?: string[] };
export type OrganizePlan = { sides: Side[]; created_at: number; scanned: number; conforming: number; moves: number; skips: Record<string, number> };
export type ArtResult = { source: string; title: string; artist?: string; url: string; thumb: string; width: number; height: number };
export type PreparedArt = { token: string; width: number; height: number; size: number; square: boolean };
export type ArtSettings = { sources: string[]; google_key: string; google_cx: string; max_size: number; min_size: number };
export type AlbumSong = TagFile & { has_cover: boolean; embed_cover: boolean };
export type Album = { folder: string; songs: AlbumSong[]; folder_cover?: string };
export type ArtApply = { token: string; embed: boolean; folder_file: boolean };
export const artThumb = (u: string) => `/api/art/thumb?u=${encodeURIComponent(u)}`;
export const coverURL = (pairId: number, side: Side, path: string, bust = "") =>
`/api/pairs/${pairId}/cover?side=${side}&path=${encodeURIComponent(path)}${bust ? `&v=${bust}` : ""}`;