feat: add per-library download detection auto-schedule
Adds a configurable schedule (manual/hourly/daily/weekly) for the download detection job in the library settings modal. The indexer scheduler triggers the job automatically, and the API job poller processes it — consistent with the reading_status_push pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,8 @@ export type LibraryDto = {
|
||||
reading_status_provider: string | null;
|
||||
reading_status_push_mode: string;
|
||||
next_reading_status_push_at: string | null;
|
||||
download_detection_mode: string;
|
||||
next_download_detection_at: string | null;
|
||||
};
|
||||
|
||||
export type IndexJobDto = {
|
||||
@@ -301,12 +303,14 @@ export async function updateLibraryMonitoring(
|
||||
scanMode: string,
|
||||
watcherEnabled?: boolean,
|
||||
metadataRefreshMode?: string,
|
||||
downloadDetectionMode?: string,
|
||||
) {
|
||||
const body: {
|
||||
monitor_enabled: boolean;
|
||||
scan_mode: string;
|
||||
watcher_enabled?: boolean;
|
||||
metadata_refresh_mode?: string;
|
||||
download_detection_mode?: string;
|
||||
} = {
|
||||
monitor_enabled: monitorEnabled,
|
||||
scan_mode: scanMode,
|
||||
@@ -317,6 +321,9 @@ export async function updateLibraryMonitoring(
|
||||
if (metadataRefreshMode !== undefined) {
|
||||
body.metadata_refresh_mode = metadataRefreshMode;
|
||||
}
|
||||
if (downloadDetectionMode !== undefined) {
|
||||
body.download_detection_mode = downloadDetectionMode;
|
||||
}
|
||||
return apiFetch<LibraryDto>(`/libraries/${libraryId}/monitoring`, {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify(body),
|
||||
|
||||
@@ -202,6 +202,9 @@ const en: Record<TranslationKey, string> = {
|
||||
"libraryActions.readingStatusProviderDesc": "Syncs reading states (read / reading / planned) with an external service",
|
||||
"libraryActions.readingStatusPushSchedule": "Auto-push schedule",
|
||||
"libraryActions.readingStatusPushScheduleDesc": "Automatically push reading progress to the provider on a schedule",
|
||||
"libraryActions.sectionProwlarr": "Download detection",
|
||||
"libraryActions.downloadDetectionSchedule": "Auto-detection schedule",
|
||||
"libraryActions.downloadDetectionScheduleDesc": "Automatically run missing volume detection via Prowlarr on a schedule",
|
||||
|
||||
// Reading status modal
|
||||
"readingStatus.button": "Reading status",
|
||||
|
||||
@@ -200,6 +200,9 @@ const fr = {
|
||||
"libraryActions.readingStatusProviderDesc": "Synchronise les états de lecture (lu / en cours / planifié) avec un service externe",
|
||||
"libraryActions.readingStatusPushSchedule": "Synchronisation automatique",
|
||||
"libraryActions.readingStatusPushScheduleDesc": "Pousse automatiquement la progression de lecture vers le provider selon un calendrier",
|
||||
"libraryActions.sectionProwlarr": "Détection de téléchargements",
|
||||
"libraryActions.downloadDetectionSchedule": "Détection automatique",
|
||||
"libraryActions.downloadDetectionScheduleDesc": "Lance automatiquement la détection de volumes manquants via Prowlarr selon un calendrier",
|
||||
|
||||
// Reading status modal
|
||||
"readingStatus.button": "État de lecture",
|
||||
|
||||
Reference in New Issue
Block a user