mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-07 13:56:37 +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:
@@ -158,6 +158,24 @@ const GROUPS: SettingGroup[] = [
|
||||
hint: '留空则默认整理到各媒体库对应路径(见下方参考)',
|
||||
placeholder: '/mnt/media/organized',
|
||||
},
|
||||
{
|
||||
key: 'organize.transfer_mode',
|
||||
label: '默认转移方式',
|
||||
type: 'select',
|
||||
hint: '移动会删除源文件;复制/硬链接/软链接保留源文件,PT 做种不中断。硬链接同盘零额外占用。',
|
||||
options: [
|
||||
{ value: 'move', label: '移动(删除源文件)' },
|
||||
{ value: 'copy', label: '复制(保留源文件)' },
|
||||
{ value: 'hardlink', label: '硬链接(保留源,做种不中断,不占双倍空间)' },
|
||||
{ value: 'symlink', label: '软链接(符号链接,保留源)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'organize.keep_seeding',
|
||||
label: '保种(整理后继续做种上传)',
|
||||
type: 'toggle',
|
||||
hint: '开启后即使选择「移动」也会自动改用硬链接(跨盘退化为复制)保留源文件,确保 qBittorrent 转移后继续做种上传。',
|
||||
},
|
||||
{
|
||||
key: 'organize.movie_format',
|
||||
label: '电影命名格式',
|
||||
@@ -195,6 +213,12 @@ const GROUPS: SettingGroup[] = [
|
||||
type: 'text',
|
||||
placeholder: 'zh-CN',
|
||||
},
|
||||
{
|
||||
key: 'scan.periodic_enabled',
|
||||
label: '周期性整库重扫',
|
||||
type: 'toggle',
|
||||
hint: '默认关闭。文件新增/变更由实时监听增量入库,无需定时全量重扫。开启会每 60 分钟重扫整库,频繁读盘会损伤硬盘,一般无需开启。',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user