mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03:00
fix(server): don't reimport files more than once (#16375)
* fix(server) don't reimport files more than once * fix: test --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a708649504
commit
d20e2e268a
@@ -249,7 +249,6 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.image.id,
|
||||
duration: null,
|
||||
fileCreatedAt: sidecarDate,
|
||||
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
||||
localDateTime: sidecarDate,
|
||||
});
|
||||
});
|
||||
@@ -269,7 +268,6 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.image.id,
|
||||
duration: null,
|
||||
fileCreatedAt: fileModifiedAt,
|
||||
fileModifiedAt,
|
||||
localDateTime: fileModifiedAt,
|
||||
});
|
||||
});
|
||||
@@ -287,7 +285,6 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.image.id,
|
||||
duration: null,
|
||||
fileCreatedAt,
|
||||
fileModifiedAt,
|
||||
localDateTime: fileCreatedAt,
|
||||
});
|
||||
});
|
||||
@@ -322,7 +319,6 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.image.id,
|
||||
duration: null,
|
||||
fileCreatedAt: assetStub.image.fileCreatedAt,
|
||||
fileModifiedAt: assetStub.image.fileModifiedAt,
|
||||
localDateTime: assetStub.image.fileCreatedAt,
|
||||
});
|
||||
});
|
||||
@@ -345,7 +341,6 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.withLocation.id,
|
||||
duration: null,
|
||||
fileCreatedAt: assetStub.withLocation.createdAt,
|
||||
fileModifiedAt: assetStub.withLocation.createdAt,
|
||||
localDateTime: new Date('2023-02-22T05:06:29.716Z'),
|
||||
});
|
||||
});
|
||||
@@ -867,7 +862,6 @@ describe(MetadataService.name, () => {
|
||||
id: assetStub.image.id,
|
||||
duration: null,
|
||||
fileCreatedAt: dateForTest,
|
||||
fileModifiedAt: dateForTest,
|
||||
localDateTime: dateForTest,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -248,7 +248,7 @@ export class MetadataService extends BaseService {
|
||||
duration: exifTags.Duration?.toString() ?? null,
|
||||
localDateTime,
|
||||
fileCreatedAt: exifData.dateTimeOriginal ?? undefined,
|
||||
fileModifiedAt: exifData.modifyDate ?? undefined,
|
||||
fileModifiedAt: stats.mtime,
|
||||
});
|
||||
|
||||
await this.assetRepository.upsertJobStatus({
|
||||
|
||||
Reference in New Issue
Block a user