feat(v1.4.0): 视频功能 — 目录导入+MP4徽标时长角标+单击弹窗播放+右键视频编辑(加/去水印,加/去字幕声音)+多选图片AI一键生成视频(标题+KEY+音色+画幅,分镜-朗读-字幕-拼接入库)

This commit is contained in:
jinghui committed 2026-11-18 11:59:02 +08:00
1 parent 94ac94436c
commit 5965d33aca
15 files changed
+1501 -14

No files matched your search

+11 -3
View File
@@ -104,6 +104,13 @@ class LibraryDatabase {
// 列已存在,忽略错误
}
// 添加 duration 列(如果不存在):视频时长(秒),图片为 0
try {
this.db.exec(`ALTER TABLE images ADD COLUMN duration REAL DEFAULT 0`);
} catch (e) {
// 列已存在,忽略错误
}
// Folders table
this.db.exec(`
CREATE TABLE IF NOT EXISTS folders (
@@ -184,8 +191,8 @@ class LibraryDatabase {
insertImage(imageData) {
const stmt = this.db.prepare(`
INSERT OR REPLACE INTO images
(path, filename, folder, size, width, height, format, file_type, created_at, modified_at, file_hash, thumbnail_path, thumbnail_size, indexed_at, ocr_text, ocr_done)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
(path, filename, folder, size, width, height, format, file_type, created_at, modified_at, file_hash, thumbnail_path, thumbnail_size, indexed_at, ocr_text, ocr_done, duration)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
`);
const result = stmt.run(
imageData.path,
@@ -203,7 +210,8 @@ class LibraryDatabase {
imageData.thumbnail_size,
Date.now(),
imageData.ocr_text || '',
imageData.ocr_done !== undefined ? imageData.ocr_done : 0
imageData.ocr_done !== undefined ? imageData.ocr_done : 0,
imageData.duration || 0
);
// 更新数据库修改时间
this.updateLastModified();