0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-11 02:23:09 -05:00

fix(server): not in album filter with context search (#7275)

This commit is contained in:
Alex 2024-02-20 20:44:34 -06:00 committed by GitHub
parent e33fd40b4c
commit bb5236ae65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 37 additions and 4 deletions

View file

@ -18,6 +18,7 @@ Name | Type | Description | Notes
**isExternal** | **bool** | | [optional] **isExternal** | **bool** | | [optional]
**isFavorite** | **bool** | | [optional] **isFavorite** | **bool** | | [optional]
**isMotion** | **bool** | | [optional] **isMotion** | **bool** | | [optional]
**isNotInAlbum** | **bool** | | [optional]
**isOffline** | **bool** | | [optional] **isOffline** | **bool** | | [optional]
**isReadOnly** | **bool** | | [optional] **isReadOnly** | **bool** | | [optional]
**isVisible** | **bool** | | [optional] **isVisible** | **bool** | | [optional]

View file

@ -23,6 +23,7 @@ class SmartSearchDto {
this.isExternal, this.isExternal,
this.isFavorite, this.isFavorite,
this.isMotion, this.isMotion,
this.isNotInAlbum,
this.isOffline, this.isOffline,
this.isReadOnly, this.isReadOnly,
this.isVisible, this.isVisible,
@ -126,6 +127,14 @@ class SmartSearchDto {
/// ///
bool? isMotion; bool? isMotion;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isNotInAlbum;
/// ///
/// Please note: This property should have been non-nullable! Since the specification file /// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated /// does not include a default value (using the "default:" property), however, the generated
@ -300,6 +309,7 @@ class SmartSearchDto {
other.isExternal == isExternal && other.isExternal == isExternal &&
other.isFavorite == isFavorite && other.isFavorite == isFavorite &&
other.isMotion == isMotion && other.isMotion == isMotion &&
other.isNotInAlbum == isNotInAlbum &&
other.isOffline == isOffline && other.isOffline == isOffline &&
other.isReadOnly == isReadOnly && other.isReadOnly == isReadOnly &&
other.isVisible == isVisible && other.isVisible == isVisible &&
@ -335,6 +345,7 @@ class SmartSearchDto {
(isExternal == null ? 0 : isExternal!.hashCode) + (isExternal == null ? 0 : isExternal!.hashCode) +
(isFavorite == null ? 0 : isFavorite!.hashCode) + (isFavorite == null ? 0 : isFavorite!.hashCode) +
(isMotion == null ? 0 : isMotion!.hashCode) + (isMotion == null ? 0 : isMotion!.hashCode) +
(isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) +
(isOffline == null ? 0 : isOffline!.hashCode) + (isOffline == null ? 0 : isOffline!.hashCode) +
(isReadOnly == null ? 0 : isReadOnly!.hashCode) + (isReadOnly == null ? 0 : isReadOnly!.hashCode) +
(isVisible == null ? 0 : isVisible!.hashCode) + (isVisible == null ? 0 : isVisible!.hashCode) +
@ -358,7 +369,7 @@ class SmartSearchDto {
(withExif == null ? 0 : withExif!.hashCode); (withExif == null ? 0 : withExif!.hashCode);
@override @override
String toString() => 'SmartSearchDto[city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isArchived=$isArchived, isEncoded=$isEncoded, isExternal=$isExternal, isFavorite=$isFavorite, isMotion=$isMotion, isOffline=$isOffline, isReadOnly=$isReadOnly, isVisible=$isVisible, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, page=$page, query=$query, size=$size, state=$state, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, withArchived=$withArchived, withDeleted=$withDeleted, withExif=$withExif]'; String toString() => 'SmartSearchDto[city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isArchived=$isArchived, isEncoded=$isEncoded, isExternal=$isExternal, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, isReadOnly=$isReadOnly, isVisible=$isVisible, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, page=$page, query=$query, size=$size, state=$state, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, withArchived=$withArchived, withDeleted=$withDeleted, withExif=$withExif]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -412,6 +423,11 @@ class SmartSearchDto {
} else { } else {
// json[r'isMotion'] = null; // json[r'isMotion'] = null;
} }
if (this.isNotInAlbum != null) {
json[r'isNotInAlbum'] = this.isNotInAlbum;
} else {
// json[r'isNotInAlbum'] = null;
}
if (this.isOffline != null) { if (this.isOffline != null) {
json[r'isOffline'] = this.isOffline; json[r'isOffline'] = this.isOffline;
} else { } else {
@ -534,6 +550,7 @@ class SmartSearchDto {
isExternal: mapValueOfType<bool>(json, r'isExternal'), isExternal: mapValueOfType<bool>(json, r'isExternal'),
isFavorite: mapValueOfType<bool>(json, r'isFavorite'), isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
isMotion: mapValueOfType<bool>(json, r'isMotion'), isMotion: mapValueOfType<bool>(json, r'isMotion'),
isNotInAlbum: mapValueOfType<bool>(json, r'isNotInAlbum'),
isOffline: mapValueOfType<bool>(json, r'isOffline'), isOffline: mapValueOfType<bool>(json, r'isOffline'),
isReadOnly: mapValueOfType<bool>(json, r'isReadOnly'), isReadOnly: mapValueOfType<bool>(json, r'isReadOnly'),
isVisible: mapValueOfType<bool>(json, r'isVisible'), isVisible: mapValueOfType<bool>(json, r'isVisible'),

View file

@ -66,6 +66,11 @@ void main() {
// TODO // TODO
}); });
// bool isNotInAlbum
test('to test the property `isNotInAlbum`', () async {
// TODO
});
// bool isOffline // bool isOffline
test('to test the property `isOffline`', () async { test('to test the property `isOffline`', () async {
// TODO // TODO

View file

@ -9435,6 +9435,9 @@
"isMotion": { "isMotion": {
"type": "boolean" "type": "boolean"
}, },
"isNotInAlbum": {
"type": "boolean"
},
"isOffline": { "isOffline": {
"type": "boolean" "type": "boolean"
}, },

View file

@ -3880,6 +3880,12 @@ export interface SmartSearchDto {
* @memberof SmartSearchDto * @memberof SmartSearchDto
*/ */
'isMotion'?: boolean; 'isMotion'?: boolean;
/**
*
* @type {boolean}
* @memberof SmartSearchDto
*/
'isNotInAlbum'?: boolean;
/** /**
* *
* @type {boolean} * @type {boolean}

View file

@ -656,6 +656,7 @@ export type SmartSearchDto = {
isExternal?: boolean; isExternal?: boolean;
isFavorite?: boolean; isFavorite?: boolean;
isMotion?: boolean; isMotion?: boolean;
isNotInAlbum?: boolean;
isOffline?: boolean; isOffline?: boolean;
isReadOnly?: boolean; isReadOnly?: boolean;
isVisible?: boolean; isVisible?: boolean;

View file

@ -118,6 +118,9 @@ class BaseSearchDto {
@Type(() => Number) @Type(() => Number)
@Optional() @Optional()
size?: number; size?: number;
@QueryBoolean({ optional: true })
isNotInAlbum?: boolean;
} }
export class MetadataSearchDto extends BaseSearchDto { export class MetadataSearchDto extends BaseSearchDto {
@ -170,9 +173,6 @@ export class MetadataSearchDto extends BaseSearchDto {
@ApiProperty({ enumName: 'AssetOrder', enum: AssetOrder }) @ApiProperty({ enumName: 'AssetOrder', enum: AssetOrder })
order?: AssetOrder; order?: AssetOrder;
@QueryBoolean({ optional: true })
isNotInAlbum?: boolean;
@Optional() @Optional()
personIds?: string[]; personIds?: string[];
} }