diff --git a/README.md b/README.md index 79ee550..ca3b388 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ lightScore = 亮度 > 175 的像素占比 ## 注意事项 - 默认使用**移动**模式,原文件会从源目录移走;同名文件跨磁盘时自动降级为复制 + 删除 -- 已整理文件全部移动到 `{当前目录名}-picker` 白名单目录内,重复运行会跳过该目录,并将新文件并入已有的分类目录 +- 已整理文件全部移动到 `KMP已整理` 白名单目录内,重复运行会跳过该目录,并将新文件并入已有的分类目录 - 扫描整理由页面点击触发,整理期间服务会短暂占用较多 CPU/磁盘,属正常现象 - 同一时间只允许一次扫描整理;重复点击会提示「正在运行中」 - GIF 图片单独归入「图片_GIF」;GIF 视频按方向归入「视频_*_GIF」 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 6873630..e49d10d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -463,9 +463,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -567,9 +564,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -584,9 +578,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -601,9 +592,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -618,9 +606,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -635,9 +620,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -652,9 +634,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -669,9 +648,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -686,9 +662,6 @@ "ppc64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -703,9 +676,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -720,9 +690,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -737,9 +704,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -754,9 +718,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -771,9 +732,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 068bff9..71f2df6 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -12,14 +12,14 @@ text-color="#4a5a78" active-text-color="#1677ff" > - - - 统计看板 - 扫描整理 + + + 统计看板 + 媒体库 diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index cc8a1ca..bdff5c0 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -8,7 +8,7 @@ Vue.use(Router) export default new Router({ routes: [ - {path: '/', redirect: '/dashboard'}, + {path: '/', redirect: '/scan'}, {path: '/dashboard', component: Dashboard}, {path: '/media', component: MediaList}, {path: '/scan', component: Scan} diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index 1107d76..d4fbded 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -16,6 +16,21 @@
{{ fmtSize(stats.totalSize) }}
所有文件占用
+
+
平均文件
+
{{ fmtSize(stats.avgSize) }}
+
单文件平均体积
+
+
+
最大文件
+
{{ fmtSize(stats.maxSize) }}
+
体积最大的文件
+
+
+
最小文件
+
{{ fmtSize(stats.minSize) }}
+
体积最小的文件
+
重复文件
{{ stats.duplicate }}
@@ -26,6 +41,11 @@
{{ fmtSize(stats.dupSize) }}
可释放空间(约)
+
+
总时长
+
{{ fmtDuration(stats.durationTotal) }}
+
平均 {{ fmtDuration(stats.durationAvg) }}
+
@@ -86,6 +106,66 @@
暂无格式数据
+ +
+
时长分布(视频/音频)
+
+ {{ item.key }} + + {{ item.count }} +
+
当前媒体库暂无时长数据,扫描含视频/音频的目录后显示
+
+ +
+
入库趋势(近30天)
+
+ {{ item.key }} + + {{ item.count }} +
+
暂无入库记录
+
+ +
+
归类目录分布
+
+ {{ item.key }} + + {{ item.count }} +
+
暂无归类记录(扫描整理后显示)
+
+ +
+
扩展名分布
+
+ {{ item.key }} + + {{ item.count }} +
+
暂无扩展名数据
+
+ +
+
MIME 类型分布
+
+ {{ item.key }} + + {{ item.count }} +
+
暂无 MIME 数据
+
+ +
+
音频编码分布
+
+ {{ item.key }} + + {{ item.count }} +
+
当前媒体库暂无音频数据,扫描含音频文件的目录后显示
+
@@ -119,7 +199,18 @@ export default { formatCount: [], duplicate: 0, dupSize: 0, - topLarge: [] + topLarge: [], + durationTotal: 0, + durationAvg: 0, + avgSize: 0, + maxSize: 0, + minSize: 0, + durationBins: [], + createdCounts: [], + categoryCounts: [], + extCounts: [], + mimeCounts: [], + audioCodecCount: [] } } }, @@ -135,6 +226,24 @@ export default { }, formatTotal() { return this.sumCount(this.stats.formatCount) + }, + durationTotal() { + return this.sumCount(this.stats.durationBins) + }, + createdTotal() { + return this.sumCount(this.stats.createdCounts) + }, + categoryTotal() { + return this.sumCount(this.stats.categoryCounts) + }, + extTotal() { + return this.sumCount(this.stats.extCounts) + }, + mimeTotal() { + return this.sumCount(this.stats.mimeCounts) + }, + audioCodecTotal() { + return this.sumCount(this.stats.audioCodecCount) } }, mounted() { @@ -168,6 +277,15 @@ export default { } return size.toFixed(size >= 100 || i === 0 ? 0 : 1) + ' ' + units[i] }, + fmtDuration(sec) { + if (!sec && sec !== 0) return '-' + const h = Math.floor(sec / 3600) + const m = Math.floor((sec % 3600) / 60) + const s = Math.floor(sec % 60) + if (h > 0) return h + 'h' + (m > 0 ? m + 'm' : '') + if (m > 0) return m + 'm' + s + 's' + return s + 's' + }, typeName(type) { return {image: '图片', video: '视频', audio: '音频'}[type] || type }, @@ -266,6 +384,10 @@ export default { text-overflow: ellipsis; } +.top-panel .dist-label { + width: 260px; +} + .dist-count { width: 44px; text-align: right; diff --git a/frontend/src/views/MediaList.vue b/frontend/src/views/MediaList.vue index 2a10941..2da4b61 100644 --- a/frontend/src/views/MediaList.vue +++ b/frontend/src/views/MediaList.vue @@ -32,7 +32,7 @@
- + @@ -48,7 +48,7 @@ {{ scope.row.orientation }} - + - + - + - + - +