You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-16 07:24:40 +02:00
feat(server): Add album filter to search (#18985)
* - updated dtos - added inAlbums to search builder - only check isNotInAlbum if albumIds is blank/empty * - consider inAlbums as OR * - make open-api-dart * - lint & format * - remove inAlbums groupBy clause * - merge main open-api * - make open-api * - inAlbums filter AND instead of OR
This commit is contained in:
11
mobile/openapi/lib/model/random_search_dto.dart
generated
11
mobile/openapi/lib/model/random_search_dto.dart
generated
@ -13,6 +13,7 @@ part of openapi.api;
|
||||
class RandomSearchDto {
|
||||
/// Returns a new [RandomSearchDto] instance.
|
||||
RandomSearchDto({
|
||||
this.albumIds = const [],
|
||||
this.city,
|
||||
this.country,
|
||||
this.createdAfter,
|
||||
@ -46,6 +47,8 @@ class RandomSearchDto {
|
||||
this.withStacked,
|
||||
});
|
||||
|
||||
List<String> albumIds;
|
||||
|
||||
String? city;
|
||||
|
||||
String? country;
|
||||
@ -252,6 +255,7 @@ class RandomSearchDto {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is RandomSearchDto &&
|
||||
_deepEquality.equals(other.albumIds, albumIds) &&
|
||||
other.city == city &&
|
||||
other.country == country &&
|
||||
other.createdAfter == createdAfter &&
|
||||
@ -287,6 +291,7 @@ class RandomSearchDto {
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(albumIds.hashCode) +
|
||||
(city == null ? 0 : city!.hashCode) +
|
||||
(country == null ? 0 : country!.hashCode) +
|
||||
(createdAfter == null ? 0 : createdAfter!.hashCode) +
|
||||
@ -320,10 +325,11 @@ class RandomSearchDto {
|
||||
(withStacked == null ? 0 : withStacked!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'RandomSearchDto[city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]';
|
||||
String toString() => 'RandomSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceId=$deviceId, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'albumIds'] = this.albumIds;
|
||||
if (this.city != null) {
|
||||
json[r'city'] = this.city;
|
||||
} else {
|
||||
@ -483,6 +489,9 @@ class RandomSearchDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return RandomSearchDto(
|
||||
albumIds: json[r'albumIds'] is Iterable
|
||||
? (json[r'albumIds'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
city: mapValueOfType<String>(json, r'city'),
|
||||
country: mapValueOfType<String>(json, r'country'),
|
||||
createdAfter: mapDateTime(json, r'createdAfter', r''),
|
||||
|
Reference in New Issue
Block a user