mirror of
https://github.com/immich-app/immich.git
synced 2025-12-26 09:14:58 +03:00
feat(server): Nullable asset dates (#15669)
* nullable dates * wip * don't search for null dates * Add placeholder type * cleanup
This commit is contained in:
committed by
GitHub
parent
f5edc87e4d
commit
5407a28533
@@ -503,7 +503,7 @@ export class LibraryService extends BaseService {
|
||||
}
|
||||
|
||||
const mtime = stat.mtime;
|
||||
const isAssetModified = mtime.toISOString() !== asset.fileModifiedAt.toISOString();
|
||||
const isAssetModified = !asset.fileModifiedAt || mtime.toISOString() !== asset.fileModifiedAt.toISOString();
|
||||
|
||||
if (asset.isOffline || isAssetModified) {
|
||||
this.logger.debug(`Asset was offline or modified, updating asset record ${asset.originalPath}`);
|
||||
|
||||
@@ -171,6 +171,14 @@ export class MetadataService extends BaseService {
|
||||
|
||||
this.logger.verbose('Exif Tags', exifTags);
|
||||
|
||||
if (!asset.fileCreatedAt) {
|
||||
asset.fileCreatedAt = stats.mtime;
|
||||
}
|
||||
|
||||
if (!asset.fileModifiedAt) {
|
||||
asset.fileModifiedAt = stats.mtime;
|
||||
}
|
||||
|
||||
const { dateTimeOriginal, localDateTime, timeZone, modifyDate } = this.getDates(asset, exifTags);
|
||||
const { latitude, longitude, country, state, city } = await this.getGeo(exifTags, reverseGeocoding);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user