File rename templates & admin torrent approval

Add support for admin-driven interactive torrent selection and a file rename/template feature. Integrates an InteractiveTorrentSearchModal into the pending-approval admin UI, adds an admin approve flow that accepts an admin-selected torrent, and surfaces user/admin-selected torrent details in the UI. Introduces fileRenameEnabled and fileRenameTemplate settings (API + UI), persists them to configuration, and clears related caches. Pass renameConfig through the organize/organizeEbook flows and implement renaming in the FileOrganizer (single/multi-file handling). Enhance path-template utilities with conditional block resolution, filename-template validation, mock filename previews, and a buildRenamedFilename helper. Update tests to cover conditional templates and filename preview behavior.
This commit is contained in:
kikootwo
2026-02-25 09:47:57 -05:00
parent 33c2265e56
commit 03f82d4841
13 changed files with 1095 additions and 108 deletions
+1 -1
View File
@@ -433,7 +433,7 @@ describe('Setup test routes', () => {
expect(payload.success).toBe(true);
expect(payload.template).toBeDefined();
expect(payload.template.isValid).toBe(false);
expect(payload.template.error).toContain('Unknown variable');
expect(payload.template.error).toContain('No valid variable found in conditional block');
expect(payload.template.previewPaths).toBeUndefined();
});