mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
date->string
This commit is contained in:
parent
bf0be6a655
commit
73cd236756
@ -48,7 +48,7 @@ class TimeBucketAssetResponseDto {
|
|||||||
|
|
||||||
List<String> livePhotoVideoId;
|
List<String> livePhotoVideoId;
|
||||||
|
|
||||||
List<DateTime> localDateTime;
|
List<String> localDateTime;
|
||||||
|
|
||||||
List<String> ownerId;
|
List<String> ownerId;
|
||||||
|
|
||||||
@ -154,7 +154,9 @@ class TimeBucketAssetResponseDto {
|
|||||||
livePhotoVideoId: json[r'livePhotoVideoId'] is Iterable
|
livePhotoVideoId: json[r'livePhotoVideoId'] is Iterable
|
||||||
? (json[r'livePhotoVideoId'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'livePhotoVideoId'] as Iterable).cast<String>().toList(growable: false)
|
||||||
: const [],
|
: const [],
|
||||||
localDateTime: DateTime.listFromJson(json[r'localDateTime']),
|
localDateTime: json[r'localDateTime'] is Iterable
|
||||||
|
? (json[r'localDateTime'] as Iterable).cast<String>().toList(growable: false)
|
||||||
|
: const [],
|
||||||
ownerId: json[r'ownerId'] is Iterable
|
ownerId: json[r'ownerId'] is Iterable
|
||||||
? (json[r'ownerId'] as Iterable).cast<String>().toList(growable: false)
|
? (json[r'ownerId'] as Iterable).cast<String>().toList(growable: false)
|
||||||
: const [],
|
: const [],
|
||||||
|
@ -13627,7 +13627,6 @@
|
|||||||
"localDateTime": {
|
"localDateTime": {
|
||||||
"default": [],
|
"default": [],
|
||||||
"items": {
|
"items": {
|
||||||
"format": "date-time",
|
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
|
@ -99,8 +99,8 @@ export class TimeBucketAssetResponseDto implements TimeBucketAssets {
|
|||||||
@ApiProperty({ type: [String] })
|
@ApiProperty({ type: [String] })
|
||||||
thumbhash: (string | null)[] = [];
|
thumbhash: (string | null)[] = [];
|
||||||
|
|
||||||
@ApiProperty()
|
@ApiProperty({ type: [String] })
|
||||||
localDateTime: Date[] = [];
|
localDateTime: string[] = [];
|
||||||
|
|
||||||
@ApiProperty({ type: [String] })
|
@ApiProperty({ type: [String] })
|
||||||
duration: (string | null)[] = [];
|
duration: (string | null)[] = [];
|
||||||
|
@ -612,6 +612,7 @@ export class AssetRepository {
|
|||||||
'exif.city as city',
|
'exif.city as city',
|
||||||
'exif.country as country',
|
'exif.country as country',
|
||||||
])
|
])
|
||||||
|
.select(sql<string>`to_json("localDateTime" at time zone 'UTC')#>>'{}'`.as('localDateTime'))
|
||||||
.$if(!!options.albumId, (qb) =>
|
.$if(!!options.albumId, (qb) =>
|
||||||
qb
|
qb
|
||||||
.innerJoin('albums_assets_assets', 'albums_assets_assets.assetsId', 'assets.id')
|
.innerJoin('albums_assets_assets', 'albums_assets_assets.assetsId', 'assets.id')
|
||||||
|
@ -20,7 +20,7 @@ export class TimelineService extends BaseService {
|
|||||||
async getTimeBuckets(auth: AuthDto, dto: TimeBucketDto): Promise<TimeBucketsResponseDto[]> {
|
async getTimeBuckets(auth: AuthDto, dto: TimeBucketDto): Promise<TimeBucketsResponseDto[]> {
|
||||||
await this.timeBucketChecks(auth, dto);
|
await this.timeBucketChecks(auth, dto);
|
||||||
const timeBucketOptions = await this.buildTimeBucketOptions(auth, dto);
|
const timeBucketOptions = await this.buildTimeBucketOptions(auth, dto);
|
||||||
return this.assetRepository.getTimeBuckets(timeBucketOptions);
|
return await this.assetRepository.getTimeBuckets(timeBucketOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getTimeBucket(auth: AuthDto, dto: TimeBucketAssetDto): Promise<TimeBucketResponseDto> {
|
async getTimeBucket(auth: AuthDto, dto: TimeBucketAssetDto): Promise<TimeBucketResponseDto> {
|
||||||
|
@ -19,7 +19,7 @@ export type TimeBucketAssets = {
|
|||||||
isVideo: number[];
|
isVideo: number[];
|
||||||
isImage: number[];
|
isImage: number[];
|
||||||
thumbhash: (string | null)[];
|
thumbhash: (string | null)[];
|
||||||
localDateTime: Date[];
|
localDateTime: string[];
|
||||||
stack: (TimelineStack | null)[];
|
stack: (TimelineStack | null)[];
|
||||||
duration: (string | null)[];
|
duration: (string | null)[];
|
||||||
projectionType: (string | null)[];
|
projectionType: (string | null)[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user