mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: use force instead of forceRefresh (#4394)
This commit is contained in:
parent
687d896c63
commit
d8e66acd02
3 changed files with 22 additions and 23 deletions
|
|
@ -186,7 +186,7 @@ export class LibraryService {
|
|||
let doImport = false;
|
||||
let doRefresh = false;
|
||||
|
||||
if (job.forceRefresh) {
|
||||
if (job.force) {
|
||||
doRefresh = true;
|
||||
}
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ export class LibraryService {
|
|||
`File modification time has changed, re-importing asset: ${assetPath}. Old mtime: ${existingAssetEntity.fileModifiedAt}. New mtime: ${stats.mtime}`,
|
||||
);
|
||||
doRefresh = true;
|
||||
} else if (!job.forceRefresh && stats && !existingAssetEntity.isOffline) {
|
||||
} else if (!job.force && stats && !existingAssetEntity.isOffline) {
|
||||
// Asset exists on disk and in db and mtime has not changed. Also, we are not forcing refresn. Therefore, do nothing
|
||||
this.logger.debug(`Asset already exists in database and on disk, will not import: ${assetPath}`);
|
||||
}
|
||||
|
|
@ -410,7 +410,7 @@ export class LibraryService {
|
|||
id: job.id,
|
||||
assetPath: path.normalize(assetPath),
|
||||
ownerId: library.ownerId,
|
||||
forceRefresh: job.refreshAllFiles ?? false,
|
||||
force: job.refreshAllFiles ?? false,
|
||||
};
|
||||
|
||||
await this.jobRepository.queue({ name: JobName.LIBRARY_SCAN_ASSET, data: libraryJobData });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue