mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-30 11:46:36 +08:00
feat(organize/scan): transfer modes, seeding-safe relocation, inode dedup, incremental scanning
- Organizer: add move/copy/hardlink/symlink transfer modes (default move), per-request target_path/transfer_mode overrides, and honor organize.target_dir / organize.transfer_mode settings. - keep_seeding (default on): escalate move->hardlink (cross-device->copy) so the qBittorrent source stays in place and continues seeding after organize. - qBittorrent SetLocation + POST /downloads/relocate to migrate whole torrents while keeping them seeding. - Scanner: FileID (device:inode) hardlink dedup to avoid duplicate recognition and double-counted storage; extract single-file ingest. - Watcher: recursive watch + incremental per-file ingest/remove instead of full re-scan; periodic full library scan now gated behind scan.periodic_enabled (default off) to reduce disk wear. - Telegram bot: handle callback_query in polling, declare allowed_updates in webhook, answer callbacks. - Frontend: settings for transfer mode / keep_seeding / periodic scan; organize panel target dir + transfer mode overrides. - Tests for transfer modes, organizer resolution, SetLocation, inode dedup, incremental ingest/remove. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
+14
-4
@@ -3,15 +3,25 @@ import { api } from './client'
|
||||
// toolsAPI groups admin-only endpoints that don't fit the other domain
|
||||
// modules: organizing media files into the canonical naming layout, and
|
||||
// dispatching a test notification through the configured channels.
|
||||
// OrganizeOverrides are optional single-request overrides for an organize
|
||||
// action. Empty fields fall back to the system settings.
|
||||
export interface OrganizeOverrides {
|
||||
target_path?: string
|
||||
transfer_mode?: string
|
||||
}
|
||||
|
||||
export const toolsAPI = {
|
||||
organizeMedia: (mediaID: string) =>
|
||||
organizeMedia: (mediaID: string, opts?: OrganizeOverrides) =>
|
||||
api
|
||||
.post<{ path: string }>(`/admin/media/${mediaID}/organize`)
|
||||
.post<{ path: string }>(`/admin/media/${mediaID}/organize`, opts ?? {})
|
||||
.then((r) => r.data),
|
||||
|
||||
organizeLibrary: (libraryID: string) =>
|
||||
organizeLibrary: (libraryID: string, opts?: OrganizeOverrides) =>
|
||||
api
|
||||
.post<Record<string, unknown>>(`/admin/libraries/${libraryID}/organize`)
|
||||
.post<Record<string, unknown>>(
|
||||
`/admin/libraries/${libraryID}/organize`,
|
||||
opts ?? {},
|
||||
)
|
||||
.then((r) => r.data),
|
||||
|
||||
notifyTest: (title: string, body: string) =>
|
||||
|
||||
Reference in New Issue
Block a user