mirror of
https://github.com/Afilmory/afilmory
synced 2026-02-01 22:48:17 +00:00
fix live photo detection with capital letter (#117)
Signed-off-by: Ricky Li <i@liqi.link>
This commit is contained in:
@@ -242,7 +242,8 @@ export class GitHubStorageProvider implements StorageProvider {
|
||||
if (!obj.key) continue
|
||||
|
||||
const dir = path.dirname(obj.key)
|
||||
const basename = path.basename(obj.key, path.extname(obj.key))
|
||||
// use path.parse to safely get the filename without extension (case-insensitive extension handling)
|
||||
const basename = path.parse(obj.key).name
|
||||
const groupKey = `${dir}/${basename}`
|
||||
|
||||
if (!fileGroups.has(groupKey)) {
|
||||
|
||||
@@ -236,7 +236,9 @@ export class LocalStorageProvider implements StorageProvider {
|
||||
|
||||
// 如果是图片文件,查找对应的视频文件
|
||||
if (SUPPORTED_FORMATS.has(ext)) {
|
||||
const baseName = path.basename(obj.key, ext)
|
||||
// use path.parse to get the name without extension to avoid issues
|
||||
// when the file extension has different casing (e.g. .HEIC)
|
||||
const baseName = path.parse(obj.key).name
|
||||
const dirName = path.dirname(obj.key)
|
||||
|
||||
// 查找对应的 .mov 文件
|
||||
|
||||
@@ -229,7 +229,7 @@ export class S3StorageProvider implements StorageProvider {
|
||||
if (!obj.key) continue
|
||||
|
||||
const dir = path.dirname(obj.key)
|
||||
const basename = path.basename(obj.key, path.extname(obj.key))
|
||||
const basename = path.parse(obj.key).name
|
||||
const groupKey = `${dir}/${basename}`
|
||||
|
||||
if (!fileGroups.has(groupKey)) {
|
||||
|
||||
Reference in New Issue
Block a user