Rename host library to master throughout
The two libraries are now "master" and "slave" everywhere: UI text, API JSON fields (master_root, rel_master, master_size, ...), Go identifiers, database columns, quality verdicts, quarantine subfolders and docs. Existing databases are upgraded by a new migration that renames the columns in place and rewrites stored "host" values, so pairs, history, cached verdicts and restorable quarantine entries carry over. Network "host" usages (SplitHostPort, the Origin/Host check) are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d06b6d546d
commit
5b088bb4a6
19 files changed
+339
-326
No files matched your search
@@ -14,7 +14,7 @@ export function PairForm({ pair, open, onClose }: { pair?: Pair; open: boolean;
|
||||
const toast = useToast();
|
||||
const blank: PairInput = {
|
||||
name: "Music",
|
||||
host_root: "",
|
||||
master_root: "",
|
||||
slave_root: "",
|
||||
quarantine_dir: "",
|
||||
extensions: [],
|
||||
@@ -25,7 +25,7 @@ export function PairForm({ pair, open, onClose }: { pair?: Pair; open: boolean;
|
||||
};
|
||||
const [f, setF] = useState<PairInput>(pair ?? blank);
|
||||
const [exts, setExts] = useState((pair?.extensions ?? []).join(", "));
|
||||
const [picker, setPicker] = useState<null | "host_root" | "slave_root" | "quarantine_dir">(null);
|
||||
const [picker, setPicker] = useState<null | "master_root" | "slave_root" | "quarantine_dir">(null);
|
||||
const [validation, setValidation] = useState<Validation | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -40,7 +40,7 @@ export function PairForm({ pair, open, onClose }: { pair?: Pair; open: boolean;
|
||||
// Send only editable fields: the API rejects unknown keys.
|
||||
const body = (): PairInput => ({
|
||||
name: f.name,
|
||||
host_root: f.host_root,
|
||||
master_root: f.master_root,
|
||||
slave_root: f.slave_root,
|
||||
quarantine_dir: f.quarantine_dir,
|
||||
auto_link_identical: f.auto_link_identical,
|
||||
@@ -76,11 +76,11 @@ export function PairForm({ pair, open, onClose }: { pair?: Pair; open: boolean;
|
||||
</Field>
|
||||
<div className="grid gap-4 md:grid-cols-2">
|
||||
<PathField
|
||||
label="Host library (keeps the files)"
|
||||
label="Master library (keeps the files)"
|
||||
hint="Example: Albums. Its files are the source of every hardlink."
|
||||
value={f.host_root}
|
||||
onChange={(v) => set("host_root", v)}
|
||||
onBrowse={() => setPicker("host_root")}
|
||||
value={f.master_root}
|
||||
onChange={(v) => set("master_root", v)}
|
||||
onBrowse={() => setPicker("master_root")}
|
||||
/>
|
||||
<PathField
|
||||
label="Slave library (gets hardlinks)"
|
||||
|
||||
Reference in new issue
Block a user