feat: 断点续传与色情识别提速/修复,支持 Linux 交叉编译
- feat: 新增续传表 scan_log,重扫跳过已归类文件(尺寸/头尾指纹校验) - fix: 色情识别记录批量入库超 SQLite 999 变量上限,改每 100 条一批 - perf: NudeNet 检测改为多线程推理池(每线程独立模型实例) - perf: 明暗分析 JPEG(YCbCr) 快路径;SQLite 读并发放开;加阶段耗时统计 - fix: 前端色情识别状态由后端如实上报(配置开关+检测服务是否起来) - feat: ffprobe 内嵌按平台拆分,Linux 构建回退系统 ffprobe,支持交叉编译 - docs: README 补充断点续传与 CentOS 交叉编译步骤 - chore: organize.workers 默认 8
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
<div class="toolbar">
|
||||
<span class="title">色情识别</span>
|
||||
<div class="toolbar-right">
|
||||
<span class="hint" v-if="!nsfwConfigured">识别功能未开启:请在 application.properties 设 nsfw.enabled=true 并重新扫描</span>
|
||||
<span class="hint" v-if="!nsfwEnabled">识别功能未开启:请在 application.properties 设 nsfw.enabled=true 并重新扫描</span>
|
||||
<span class="hint" v-else-if="!nsfwDetector">识别已配置开启,但最近一次扫描时检测服务没起来:请确认本机已安装 python 和 nudenet,再重新扫描</span>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="loadList">刷新</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,7 +59,7 @@
|
||||
|
||||
<el-empty
|
||||
v-if="!loading && list.length === 0"
|
||||
description="暂无记录。开启 nsfw.enabled 后重新扫描,判为色情的图片会出现在这里。"/>
|
||||
:description="emptyDesc"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -76,10 +77,21 @@ export default {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
nsfwConfigured: true // 后端没开启识别时列表为空,这里只做提示不做强校验
|
||||
nsfwEnabled: true, // 配置里是否开了 nsfw.enabled
|
||||
nsfwDetector: true, // 最近一次扫描时检测服务是否真的起来了
|
||||
nsfwConfigured: true // 上两者都满足才算"识别可用"
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
computed: {
|
||||
// 空列表时的提示文案:识别可用说明是"没命中",否则是"没开启/没起来"
|
||||
emptyDesc() {
|
||||
if (this.nsfwConfigured) {
|
||||
return '识别已开启,最近一次扫描没有判出色情图片。'
|
||||
}
|
||||
return '暂无记录。开启 nsfw.enabled 并确保检测服务可用后重新扫描,判为色情的图片会出现在这里。'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
@@ -88,7 +100,10 @@ export default {
|
||||
try {
|
||||
const res = await request.get('/api/nsfw/list')
|
||||
this.list = res.data.list || []
|
||||
this.nsfwConfigured = (res.data.total || 0) > 0 || this.list.length > 0
|
||||
// 后端真实上报:配置是否开启、检测服务上次是否真的起来了
|
||||
this.nsfwEnabled = res.data.nsfwEnabled !== false
|
||||
this.nsfwDetector = res.data.nsfwDetector === true
|
||||
this.nsfwConfigured = this.nsfwEnabled && this.nsfwDetector
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user