V 3.2.1 2024.11.9
1. (聚合推文)修复原创默认出图方式设置默认值 2. (聚合推文)优化出图显示 3. (聚合推文)添加图片上传功能,包括主图和选图区域 4. (聚合推文)新增图片缓存区,上传缓存图片(主图和选图区的图片),可以直接在当前小说所有的批次中的分镜中调用(下载到主图和选图区) 5. (聚合推文)添加一键修脸开关 6. (聚合推文)原创添加一键锁定 7. (聚合推文)新增小说批次任务显示当前所属小说 8. (聚合推文)小说批次任务状态显示优化 9. (聚合推文)优化后台任务状态显示 10. (聚合推文)原创,反推 一键生图 修复
This commit is contained in:
@@ -9,7 +9,7 @@ import { BaseRealmService } from './bookBasic'
|
||||
import { isEmpty } from 'lodash'
|
||||
import { OtherData } from '../../../enum/softwareEnum.js'
|
||||
import { BookBackTaskList } from '../../model/Book/BookBackTaskListModel.js'
|
||||
import { Book } from '../../../../model/book.js'
|
||||
import { Book } from '../../../../model/book/book.js'
|
||||
import { GeneralResponse } from '../../../../model/generalResponse.js'
|
||||
const { v4: uuidv4 } = require('uuid')
|
||||
|
||||
|
||||
@@ -197,6 +197,13 @@ const migration = (oldRealm: Realm, newRealm: Realm) => {
|
||||
newBookTask[i].draftDepend = ''
|
||||
}
|
||||
}
|
||||
if (oldRealm.schemaVersion < 29) {
|
||||
const oldBookTask = oldRealm.objects('BookTask')
|
||||
const newBookTask = newRealm.objects('BookTask')
|
||||
for (let i = 0; i < oldBookTask.length; i++) {
|
||||
newBookTask[i].cacheImageList = undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class BaseRealmService extends BaseService {
|
||||
@@ -238,7 +245,7 @@ export class BaseRealmService extends BaseService {
|
||||
BookTaskDetailModel
|
||||
],
|
||||
path: this.dbpath,
|
||||
schemaVersion: 27,
|
||||
schemaVersion: 29,
|
||||
migration: migration
|
||||
}
|
||||
this.realm = await Realm.open(config)
|
||||
|
||||
@@ -10,7 +10,7 @@ import { BaseRealmService } from './bookBasic.js'
|
||||
import { isEmpty } from 'lodash'
|
||||
import { FfmpegOptions } from '../../../../main/Service/ffmpegOptions.js'
|
||||
import { version } from '../../../../../package.json'
|
||||
import { Book } from '../../../../model/book.js'
|
||||
import { Book } from '../../../../model/book/book.js'
|
||||
import { GeneralResponse } from '../../../../model/generalResponse.js'
|
||||
|
||||
export class BookService extends BaseRealmService {
|
||||
@@ -205,7 +205,7 @@ export class BookService extends BaseRealmService {
|
||||
} else if (book.type == BookType.MJ_REVERSE) {
|
||||
imageCategory = BookImageCategory.MJ
|
||||
} else if (book.type == BookType.ORIGINAL) {
|
||||
imageCategory = global.config.defaultImageMode
|
||||
imageCategory = global.config.defaultImageMode ?? BookImageCategory.MJ
|
||||
} else {
|
||||
throw new Error('未知的小说类型')
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { cloneDeep, isEmpty } from 'lodash'
|
||||
import { JoinPath } from '../../../Tools/file'
|
||||
import { BookTaskDetailModel, ReversePrompt } from '../../model/Book/bookTaskDetail.js'
|
||||
const { v4: uuidv4 } = require('uuid')
|
||||
import { Book } from "../../../../model/book"
|
||||
import { Book } from "../../../../model/book/book"
|
||||
import { GeneralResponse } from '../../../../model/generalResponse.js'
|
||||
|
||||
let dbPath = path.resolve(define.db_path, 'book.realm')
|
||||
|
||||
@@ -8,7 +8,7 @@ import { BaseRealmService } from './bookBasic'
|
||||
import { JoinPath } from '../../../Tools/file'
|
||||
import { BookBackTaskList } from '../../model/Book/BookBackTaskListModel.js'
|
||||
const { v4: uuidv4 } = require('uuid')
|
||||
import { Book } from '../../../../model/book'
|
||||
import { Book } from '../../../../model/book/book'
|
||||
import { TagDefine } from '../../../tagDefine.js'
|
||||
import { ImageStyleDefine } from "../../../../define/iamgeStyleDefine"
|
||||
import { cloneDeep } from 'lodash'
|
||||
@@ -89,6 +89,7 @@ export class BookTaskService extends BaseRealmService {
|
||||
srtPath: JoinPath(define.project_path, bookTask.srtPath),
|
||||
audioPath: JoinPath(define.project_path, bookTask.audioPath),
|
||||
imageFolder: JoinPath(define.project_path, bookTask.imageFolder),
|
||||
cacheImageList: bookTask.cacheImageList ? Array.from(bookTask.cacheImageList).map(item => JoinPath(define.project_path, item)) : [],
|
||||
imageCategory: bookTask.imageCategory ? bookTask.imageCategory : BookImageCategory.MJ, // 默认使用MJ出图
|
||||
} as Book.SelectBookTask;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user