mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ed811a051d
@ -356,7 +356,7 @@
|
||||
<xmp:CreatorTool>Adobe Photoshop Lightroom 6.1 (Windows)</xmp:CreatorTool>
|
||||
<xmp:MetadataDate>2023-09-02T16:18:48+02:00</xmp:MetadataDate>
|
||||
<xmp:ModifyDate>2015-07-24T22:45:50</xmp:ModifyDate>
|
||||
<xmp:Rating>3</xmp:Rating>
|
||||
<xmp:Rating>4</xmp:Rating>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about=''
|
||||
|
@ -36,6 +36,7 @@
|
||||
<xmp:CreateDate>2018-11-17T20:27:31+01:00</xmp:CreateDate>
|
||||
<xmp:MetadataDate>2018-11-17T20:27:31+01:00</xmp:MetadataDate>
|
||||
<xmp:ModifyDate>2018-11-17T20:27:31+01:00</xmp:ModifyDate>
|
||||
<xmp:Rating>4</xmp:Rating>
|
||||
</rdf:Description>
|
||||
|
||||
<rdf:Description rdf:about=''
|
||||
|
@ -51,6 +51,7 @@ export class MetadataLoader {
|
||||
const sidecarData = exifr.sidecar(sidecarPath);
|
||||
sidecarData.then((response) => {
|
||||
metadata.keywords = [(response as any).dc.subject].flat();
|
||||
metadata.rating = (response as any).xmp.Rating;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -199,6 +200,7 @@ export class MetadataLoader {
|
||||
const sidecarData = exifr.sidecar(sidecarPath);
|
||||
sidecarData.then((response) => {
|
||||
metadata.keywords = [(response as any).dc.subject].flat();
|
||||
metadata.rating = (response as any).xmp.Rating;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -238,7 +238,6 @@ export class ContentWrapper {
|
||||
}
|
||||
ContentWrapper.mapify(cw, m, isSearchResult);
|
||||
} else if (MediaDTOUtils.isVideo(m)) {
|
||||
delete (m as PhotoDTO).metadata.rating;
|
||||
delete (m as PhotoDTO).metadata.caption;
|
||||
delete (m as PhotoDTO).metadata.cameraData;
|
||||
delete (m as PhotoDTO).metadata.faces;
|
||||
|
@ -11,10 +11,14 @@ export interface MediaDTO extends FileDTO {
|
||||
missingThumbnails?: number;
|
||||
}
|
||||
|
||||
export type RatingTypes = 0 | 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
export interface MediaMetadata {
|
||||
size: MediaDimension;
|
||||
creationDate: number;
|
||||
fileSize: number;
|
||||
keywords?: string[];
|
||||
rating?: RatingTypes;
|
||||
}
|
||||
|
||||
export interface MediaDimension {
|
||||
|
@ -27,9 +27,7 @@ export interface FaceRegion {
|
||||
}
|
||||
|
||||
export interface PhotoMetadata extends MediaMetadata {
|
||||
rating?: 0 | 1 | 2 | 3 | 4 | 5;
|
||||
caption?: string;
|
||||
keywords?: string[];
|
||||
cameraData?: CameraMetadata;
|
||||
positionData?: PositionMetaData;
|
||||
size: MediaDimension;
|
||||
|
@ -15,5 +15,4 @@ export interface VideoMetadata extends MediaMetadata {
|
||||
duration: number; // in milliseconds
|
||||
fileSize: number;
|
||||
fps: number;
|
||||
keywords?: string[];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user