1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

feat(server): add originalFileName to asset table (#2231)

This commit is contained in:
Alex
2023-04-11 05:23:39 -05:00
committed by GitHub
parent db628cec11
commit a1a62b00a0
24 changed files with 143 additions and 60 deletions

View File

@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**ownerId** | **String** | |
**deviceId** | **String** | |
**originalPath** | **String** | |
**originalFileName** | **String** | |
**resizePath** | **String** | |
**fileCreatedAt** | **String** | |
**fileModifiedAt** | **String** | |

View File

@@ -11,7 +11,6 @@ Name | Type | Description | Notes
**fileSizeInByte** | **int** | | [optional]
**make** | **String** | | [optional]
**model** | **String** | | [optional]
**imageName** | **String** | | [optional]
**exifImageWidth** | **num** | | [optional]
**exifImageHeight** | **num** | | [optional]
**orientation** | **String** | | [optional]

View File

@@ -19,6 +19,7 @@ class AssetResponseDto {
required this.ownerId,
required this.deviceId,
required this.originalPath,
required this.originalFileName,
required this.resizePath,
required this.fileCreatedAt,
required this.fileModifiedAt,
@@ -46,6 +47,8 @@ class AssetResponseDto {
String originalPath;
String originalFileName;
String? resizePath;
String fileCreatedAt;
@@ -92,6 +95,7 @@ class AssetResponseDto {
other.ownerId == ownerId &&
other.deviceId == deviceId &&
other.originalPath == originalPath &&
other.originalFileName == originalFileName &&
other.resizePath == resizePath &&
other.fileCreatedAt == fileCreatedAt &&
other.fileModifiedAt == fileModifiedAt &&
@@ -115,6 +119,7 @@ class AssetResponseDto {
(ownerId.hashCode) +
(deviceId.hashCode) +
(originalPath.hashCode) +
(originalFileName.hashCode) +
(resizePath == null ? 0 : resizePath!.hashCode) +
(fileCreatedAt.hashCode) +
(fileModifiedAt.hashCode) +
@@ -130,7 +135,7 @@ class AssetResponseDto {
(tags.hashCode);
@override
String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, resizePath=$resizePath, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, updatedAt=$updatedAt, isFavorite=$isFavorite, mimeType=$mimeType, duration=$duration, webpPath=$webpPath, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, smartInfo=$smartInfo, livePhotoVideoId=$livePhotoVideoId, tags=$tags]';
String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, originalFileName=$originalFileName, resizePath=$resizePath, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, updatedAt=$updatedAt, isFavorite=$isFavorite, mimeType=$mimeType, duration=$duration, webpPath=$webpPath, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, smartInfo=$smartInfo, livePhotoVideoId=$livePhotoVideoId, tags=$tags]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -140,6 +145,7 @@ class AssetResponseDto {
json[r'ownerId'] = this.ownerId;
json[r'deviceId'] = this.deviceId;
json[r'originalPath'] = this.originalPath;
json[r'originalFileName'] = this.originalFileName;
if (this.resizePath != null) {
json[r'resizePath'] = this.resizePath;
} else {
@@ -209,6 +215,7 @@ class AssetResponseDto {
ownerId: mapValueOfType<String>(json, r'ownerId')!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
originalPath: mapValueOfType<String>(json, r'originalPath')!,
originalFileName: mapValueOfType<String>(json, r'originalFileName')!,
resizePath: mapValueOfType<String>(json, r'resizePath'),
fileCreatedAt: mapValueOfType<String>(json, r'fileCreatedAt')!,
fileModifiedAt: mapValueOfType<String>(json, r'fileModifiedAt')!,
@@ -277,6 +284,7 @@ class AssetResponseDto {
'ownerId',
'deviceId',
'originalPath',
'originalFileName',
'resizePath',
'fileCreatedAt',
'fileModifiedAt',

View File

@@ -16,7 +16,6 @@ class ExifResponseDto {
this.fileSizeInByte,
this.make,
this.model,
this.imageName,
this.exifImageWidth,
this.exifImageHeight,
this.orientation,
@@ -41,8 +40,6 @@ class ExifResponseDto {
String? model;
String? imageName;
num? exifImageWidth;
num? exifImageHeight;
@@ -80,7 +77,6 @@ class ExifResponseDto {
other.fileSizeInByte == fileSizeInByte &&
other.make == make &&
other.model == model &&
other.imageName == imageName &&
other.exifImageWidth == exifImageWidth &&
other.exifImageHeight == exifImageHeight &&
other.orientation == orientation &&
@@ -104,7 +100,6 @@ class ExifResponseDto {
(fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) +
(make == null ? 0 : make!.hashCode) +
(model == null ? 0 : model!.hashCode) +
(imageName == null ? 0 : imageName!.hashCode) +
(exifImageWidth == null ? 0 : exifImageWidth!.hashCode) +
(exifImageHeight == null ? 0 : exifImageHeight!.hashCode) +
(orientation == null ? 0 : orientation!.hashCode) +
@@ -123,7 +118,7 @@ class ExifResponseDto {
(country == null ? 0 : country!.hashCode);
@override
String toString() => 'ExifResponseDto[fileSizeInByte=$fileSizeInByte, make=$make, model=$model, imageName=$imageName, exifImageWidth=$exifImageWidth, exifImageHeight=$exifImageHeight, orientation=$orientation, dateTimeOriginal=$dateTimeOriginal, modifyDate=$modifyDate, timeZone=$timeZone, lensModel=$lensModel, fNumber=$fNumber, focalLength=$focalLength, iso=$iso, exposureTime=$exposureTime, latitude=$latitude, longitude=$longitude, city=$city, state=$state, country=$country]';
String toString() => 'ExifResponseDto[fileSizeInByte=$fileSizeInByte, make=$make, model=$model, exifImageWidth=$exifImageWidth, exifImageHeight=$exifImageHeight, orientation=$orientation, dateTimeOriginal=$dateTimeOriginal, modifyDate=$modifyDate, timeZone=$timeZone, lensModel=$lensModel, fNumber=$fNumber, focalLength=$focalLength, iso=$iso, exposureTime=$exposureTime, latitude=$latitude, longitude=$longitude, city=$city, state=$state, country=$country]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -142,11 +137,6 @@ class ExifResponseDto {
} else {
// json[r'model'] = null;
}
if (this.imageName != null) {
json[r'imageName'] = this.imageName;
} else {
// json[r'imageName'] = null;
}
if (this.exifImageWidth != null) {
json[r'exifImageWidth'] = this.exifImageWidth;
} else {
@@ -252,7 +242,6 @@ class ExifResponseDto {
fileSizeInByte: mapValueOfType<int>(json, r'fileSizeInByte'),
make: mapValueOfType<String>(json, r'make'),
model: mapValueOfType<String>(json, r'model'),
imageName: mapValueOfType<String>(json, r'imageName'),
exifImageWidth: json[r'exifImageWidth'] == null
? null
: num.parse(json[r'exifImageWidth'].toString()),

View File

@@ -46,6 +46,11 @@ void main() {
// TODO
});
// String originalFileName
test('to test the property `originalFileName`', () async {
// TODO
});
// String resizePath
test('to test the property `resizePath`', () async {
// TODO

View File

@@ -31,11 +31,6 @@ void main() {
// TODO
});
// String imageName
test('to test the property `imageName`', () async {
// TODO
});
// num exifImageWidth
test('to test the property `exifImageWidth`', () async {
// TODO