1
0
mirror of https://github.com/immich-app/immich.git synced 2025-12-04 00:54:54 +02:00

chore(server): search filename using originalFileName (#7691)

This commit is contained in:
Alex
2024-03-06 21:36:08 -06:00
committed by GitHub
parent 4323d18387
commit 1eea547aa2
5 changed files with 10 additions and 10 deletions

View File

@@ -159,12 +159,12 @@ export function searchAssetBuilder(
builder.andWhere(`${builder.alias}.ownerId IN (:...userIds)`, { userIds: options.userIds });
}
const path = _.pick(options, ['encodedVideoPath', 'originalFileName', 'resizePath', 'webpPath']);
const path = _.pick(options, ['encodedVideoPath', 'originalPath', 'resizePath', 'webpPath']);
builder.andWhere(_.omitBy(path, _.isUndefined));
if (options.originalPath) {
builder.andWhere(`f_unaccent(${builder.alias}.originalPath) ILIKE f_unaccent(:originalPath)`, {
originalPath: `%${options.originalPath}%`,
if (options.originalFileName) {
builder.andWhere(`f_unaccent(${builder.alias}.originalFileName) ILIKE f_unaccent(:originalFileName)`, {
originalFileName: `%${options.originalFileName}%`,
});
}