mirror of
https://github.com/Afilmory/afilmory
synced 2026-02-01 22:48:17 +00:00
refactor(builder): remove maxPhotos option and related checks
Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -181,7 +181,6 @@ pnpm dev
|
||||
},
|
||||
"options": {
|
||||
"defaultConcurrency": 8,
|
||||
"maxPhotos": 5000,
|
||||
"enableLivePhotoDetection": true,
|
||||
"showProgress": true,
|
||||
"showDetailedStats": true
|
||||
@@ -215,8 +214,7 @@ pnpm dev
|
||||
|
||||
#### 构建选项 (`options`)
|
||||
|
||||
- `defaultConcurrency`: 默认并发数 (1-50)
|
||||
- `maxPhotos`: 最大照片数量限制
|
||||
- `defaultConcurrency`: 默认并发数
|
||||
- `enableLivePhotoDetection`: 启用 Live Photo 检测
|
||||
- `showProgress`: 显示构建进度
|
||||
- `showDetailedStats`: 显示详细统计信息
|
||||
|
||||
@@ -95,13 +95,6 @@ export class PhotoGalleryBuilder {
|
||||
const imageObjects = await this.storageManager.listImages()
|
||||
logger.main.info(`存储中找到 ${imageObjects.length} 张照片`)
|
||||
|
||||
// 检查照片数量限制
|
||||
if (imageObjects.length > this.config.options.maxPhotos) {
|
||||
logger.main.warn(
|
||||
`⚠️ 照片数量 (${imageObjects.length}) 超过配置限制 (${this.config.options.maxPhotos})`,
|
||||
)
|
||||
}
|
||||
|
||||
// 创建存储中存在的图片 key 集合,用于检测已删除的图片
|
||||
const s3ImageKeys = new Set(imageObjects.map((obj) => obj.key))
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ export interface BuilderConfig {
|
||||
// 默认并发限制
|
||||
defaultConcurrency: number
|
||||
|
||||
// 最大照片数量限制
|
||||
maxPhotos: number
|
||||
|
||||
// 支持的图片格式(可以覆盖默认的 SUPPORTED_FORMATS)
|
||||
supportedFormats?: Set<string>
|
||||
|
||||
@@ -87,7 +84,6 @@ export const defaultBuilderConfig: BuilderConfig = {
|
||||
|
||||
options: {
|
||||
defaultConcurrency: 10,
|
||||
maxPhotos: 10000,
|
||||
enableLivePhotoDetection: true,
|
||||
showProgress: true,
|
||||
showDetailedStats: true,
|
||||
|
||||
Reference in New Issue
Block a user