From 6f05f91a806f29097cd753bb88190ffde3e404c6 Mon Sep 17 00:00:00 2001
From: mtvpls
Date: Mon, 22 Dec 2025 22:28:54 +0800
Subject: [PATCH] =?UTF-8?q?openlist=E5=A2=9E=E5=8A=A0=E5=AE=9A=E6=97=B6?=
=?UTF-8?q?=E6=89=AB=E6=8F=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/admin/page.tsx | 20 ++++++++++
src/app/api/admin/openlist/route.ts | 12 +++++-
src/app/api/cron/route.ts | 57 +++++++++++++++++++++++++++++
src/lib/admin.types.ts | 1 +
4 files changed, 89 insertions(+), 1 deletion(-)
diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx
index 9121e76..bf2f56a 100644
--- a/src/app/admin/page.tsx
+++ b/src/app/admin/page.tsx
@@ -2544,6 +2544,7 @@ const OpenListConfigComponent = ({
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const [rootPath, setRootPath] = useState('/');
+ const [scanInterval, setScanInterval] = useState(0);
const [videos, setVideos] = useState([]);
const [refreshing, setRefreshing] = useState(false);
const [scanProgress, setScanProgress] = useState<{
@@ -2560,6 +2561,7 @@ const OpenListConfigComponent = ({
setUsername(config.OpenListConfig.Username || '');
setPassword(config.OpenListConfig.Password || '');
setRootPath(config.OpenListConfig.RootPath || '/');
+ setScanInterval(config.OpenListConfig.ScanInterval || 0);
}
}, [config]);
@@ -2597,6 +2599,7 @@ const OpenListConfigComponent = ({
Username: username,
Password: password,
RootPath: rootPath,
+ ScanInterval: scanInterval,
}),
});
@@ -2774,6 +2777,23 @@ const OpenListConfigComponent = ({
+
+
+
setScanInterval(parseInt(e.target.value) || 0)}
+ placeholder='0'
+ min='0'
+ className='w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-blue-500 focus:border-transparent'
+ />
+
+ 设置为 0 关闭定时扫描,最低 60 分钟
+
+
+