|
@@ -21,6 +21,7 @@ class AssetResponseDto {
|
|
required this.originalPath,
|
|
required this.originalPath,
|
|
required this.originalFileName,
|
|
required this.originalFileName,
|
|
required this.resized,
|
|
required this.resized,
|
|
|
|
+ required this.thumbhash,
|
|
required this.fileCreatedAt,
|
|
required this.fileCreatedAt,
|
|
required this.fileModifiedAt,
|
|
required this.fileModifiedAt,
|
|
required this.updatedAt,
|
|
required this.updatedAt,
|
|
@@ -52,6 +53,9 @@ class AssetResponseDto {
|
|
|
|
|
|
bool resized;
|
|
bool resized;
|
|
|
|
|
|
|
|
+ /// base64 encoded thumbhash
|
|
|
|
+ String? thumbhash;
|
|
|
|
+
|
|
DateTime fileCreatedAt;
|
|
DateTime fileCreatedAt;
|
|
|
|
|
|
DateTime fileModifiedAt;
|
|
DateTime fileModifiedAt;
|
|
@@ -101,6 +105,7 @@ class AssetResponseDto {
|
|
other.originalPath == originalPath &&
|
|
other.originalPath == originalPath &&
|
|
other.originalFileName == originalFileName &&
|
|
other.originalFileName == originalFileName &&
|
|
other.resized == resized &&
|
|
other.resized == resized &&
|
|
|
|
+ other.thumbhash == thumbhash &&
|
|
other.fileCreatedAt == fileCreatedAt &&
|
|
other.fileCreatedAt == fileCreatedAt &&
|
|
other.fileModifiedAt == fileModifiedAt &&
|
|
other.fileModifiedAt == fileModifiedAt &&
|
|
other.updatedAt == updatedAt &&
|
|
other.updatedAt == updatedAt &&
|
|
@@ -126,6 +131,7 @@ class AssetResponseDto {
|
|
(originalPath.hashCode) +
|
|
(originalPath.hashCode) +
|
|
(originalFileName.hashCode) +
|
|
(originalFileName.hashCode) +
|
|
(resized.hashCode) +
|
|
(resized.hashCode) +
|
|
|
|
+ (thumbhash == null ? 0 : thumbhash!.hashCode) +
|
|
(fileCreatedAt.hashCode) +
|
|
(fileCreatedAt.hashCode) +
|
|
(fileModifiedAt.hashCode) +
|
|
(fileModifiedAt.hashCode) +
|
|
(updatedAt.hashCode) +
|
|
(updatedAt.hashCode) +
|
|
@@ -141,7 +147,7 @@ class AssetResponseDto {
|
|
(checksum.hashCode);
|
|
(checksum.hashCode);
|
|
|
|
|
|
@override
|
|
@override
|
|
- String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, originalFileName=$originalFileName, resized=$resized, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, updatedAt=$updatedAt, isFavorite=$isFavorite, isArchived=$isArchived, mimeType=$mimeType, duration=$duration, exifInfo=$exifInfo, smartInfo=$smartInfo, livePhotoVideoId=$livePhotoVideoId, tags=$tags, people=$people, checksum=$checksum]';
|
|
|
|
|
|
+ String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, originalFileName=$originalFileName, resized=$resized, thumbhash=$thumbhash, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, updatedAt=$updatedAt, isFavorite=$isFavorite, isArchived=$isArchived, mimeType=$mimeType, duration=$duration, exifInfo=$exifInfo, smartInfo=$smartInfo, livePhotoVideoId=$livePhotoVideoId, tags=$tags, people=$people, checksum=$checksum]';
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
Map<String, dynamic> toJson() {
|
|
final json = <String, dynamic>{};
|
|
final json = <String, dynamic>{};
|
|
@@ -153,6 +159,11 @@ class AssetResponseDto {
|
|
json[r'originalPath'] = this.originalPath;
|
|
json[r'originalPath'] = this.originalPath;
|
|
json[r'originalFileName'] = this.originalFileName;
|
|
json[r'originalFileName'] = this.originalFileName;
|
|
json[r'resized'] = this.resized;
|
|
json[r'resized'] = this.resized;
|
|
|
|
+ if (this.thumbhash != null) {
|
|
|
|
+ json[r'thumbhash'] = this.thumbhash;
|
|
|
|
+ } else {
|
|
|
|
+ // json[r'thumbhash'] = null;
|
|
|
|
+ }
|
|
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
|
|
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
|
|
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
|
|
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
|
|
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
|
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
|
@@ -212,6 +223,7 @@ class AssetResponseDto {
|
|
originalPath: mapValueOfType<String>(json, r'originalPath')!,
|
|
originalPath: mapValueOfType<String>(json, r'originalPath')!,
|
|
originalFileName: mapValueOfType<String>(json, r'originalFileName')!,
|
|
originalFileName: mapValueOfType<String>(json, r'originalFileName')!,
|
|
resized: mapValueOfType<bool>(json, r'resized')!,
|
|
resized: mapValueOfType<bool>(json, r'resized')!,
|
|
|
|
+ thumbhash: mapValueOfType<String>(json, r'thumbhash'),
|
|
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', '')!,
|
|
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', '')!,
|
|
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!,
|
|
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!,
|
|
updatedAt: mapDateTime(json, r'updatedAt', '')!,
|
|
updatedAt: mapDateTime(json, r'updatedAt', '')!,
|
|
@@ -280,6 +292,7 @@ class AssetResponseDto {
|
|
'originalPath',
|
|
'originalPath',
|
|
'originalFileName',
|
|
'originalFileName',
|
|
'resized',
|
|
'resized',
|
|
|
|
+ 'thumbhash',
|
|
'fileCreatedAt',
|
|
'fileCreatedAt',
|
|
'fileModifiedAt',
|
|
'fileModifiedAt',
|
|
'updatedAt',
|
|
'updatedAt',
|