From 59b0206cf1e1ce80600cbc2377893b7174c6618d Mon Sep 17 00:00:00 2001 From: Odboy Date: Sat, 26 Jul 2025 21:05:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=90=88=E5=B9=B6=20NSFW=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=B0=20media=5Finfo=20=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application.properties | 2 +- frontend/src/App.vue | 4 - frontend/src/router/index.js | 2 - frontend/src/views/MediaList.vue | 53 ++++++++ frontend/src/views/NsfwList.vue | 198 ------------------------------ internal/api/media_controller.go | 36 ++++++ internal/api/nsfw_controller.go | 87 ------------- internal/api/router.go | 6 +- internal/organize/organize.go | 72 +++++------ internal/service/scan.go | 11 +- internal/store/nsfw_batch_test.go | 44 ------- internal/store/store.go | 107 ++++------------ 12 files changed, 159 insertions(+), 463 deletions(-) delete mode 100644 frontend/src/views/NsfwList.vue delete mode 100644 internal/api/nsfw_controller.go delete mode 100644 internal/store/nsfw_batch_test.go diff --git a/application.properties b/application.properties index 384737f..74f2d74 100644 --- a/application.properties +++ b/application.properties @@ -23,4 +23,4 @@ nsfw.enabled=true # python 可执行文件路径;留空自动在 PATH 里找 python/python3/py nsfw.python=C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python312\\python.exe # 判定阈值 0~1,敏感部位检测分高于此才算色情(默认 0.2,实测) -nsfw.threshold=0.2 +nsfw.threshold=0.35 diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 37374b2..71f2df6 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -24,10 +24,6 @@ 媒体库 - - - 色情识别 - diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index 529f35c..bdff5c0 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -2,7 +2,6 @@ import Vue from 'vue' import Router from 'vue-router' import Dashboard from '../views/Dashboard.vue' import MediaList from '../views/MediaList.vue' -import NsfwList from '../views/NsfwList.vue' import Scan from '../views/Scan.vue' Vue.use(Router) @@ -12,7 +11,6 @@ export default new Router({ {path: '/', redirect: '/scan'}, {path: '/dashboard', component: Dashboard}, {path: '/media', component: MediaList}, - {path: '/nsfw', component: NsfwList}, {path: '/scan', component: Scan} ] }) diff --git a/frontend/src/views/MediaList.vue b/frontend/src/views/MediaList.vue index 40f9a54..a0bc1e6 100644 --- a/frontend/src/views/MediaList.vue +++ b/frontend/src/views/MediaList.vue @@ -25,6 +25,9 @@ + + + @@ -32,6 +35,21 @@ + + + + + +