mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
Add filesystem scan trigger and version badge features
Implements optional filesystem scan triggering for Plex and Audiobookshelf after file organization, with new settings in the admin UI, setup wizard, and API. Updates documentation to reflect scan trigger options and improved file organization/cleanup logic. Refactors dropdown menus to use smart positioning and portals for better UX. Adds a version API route and a VersionBadge component to display build info in the header. Updates Docker build to inject version metadata.
This commit is contained in:
@@ -12,7 +12,7 @@ export async function PUT(request: NextRequest) {
|
||||
return requireAuth(request, async (req: AuthenticatedRequest) => {
|
||||
return requireAdmin(req, async () => {
|
||||
try {
|
||||
const { url, token, libraryId } = await request.json();
|
||||
const { url, token, libraryId, triggerScanAfterImport } = await request.json();
|
||||
|
||||
if (!url || !token || !libraryId) {
|
||||
return NextResponse.json(
|
||||
@@ -43,6 +43,13 @@ export async function PUT(request: NextRequest) {
|
||||
create: { key: 'plex_audiobook_library_id', value: libraryId },
|
||||
});
|
||||
|
||||
// Save trigger_scan_after_import setting
|
||||
await prisma.configuration.upsert({
|
||||
where: { key: 'plex.trigger_scan_after_import' },
|
||||
update: { value: triggerScanAfterImport === true ? 'true' : 'false' },
|
||||
create: { key: 'plex.trigger_scan_after_import', value: triggerScanAfterImport === true ? 'true' : 'false' },
|
||||
});
|
||||
|
||||
// Fetch and save machine identifier (for server-specific access tokens)
|
||||
// This is needed for BookDate per-user rating functionality
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user