mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
Move some metadata to mediametadata interface
Some metadata is now relevant to all supported media types due to xmp sidecar support.
This commit is contained in:
parent
6db3472ca6
commit
702b55c912
@ -11,10 +11,14 @@ export interface MediaDTO extends FileDTO {
|
|||||||
missingThumbnails?: number;
|
missingThumbnails?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type RatingTypes = 0 | 1 | 2 | 3 | 4 | 5;
|
||||||
|
|
||||||
export interface MediaMetadata {
|
export interface MediaMetadata {
|
||||||
size: MediaDimension;
|
size: MediaDimension;
|
||||||
creationDate: number;
|
creationDate: number;
|
||||||
fileSize: number;
|
fileSize: number;
|
||||||
|
keywords?: string[];
|
||||||
|
rating?: RatingTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MediaDimension {
|
export interface MediaDimension {
|
||||||
|
@ -26,12 +26,8 @@ export interface FaceRegion {
|
|||||||
box?: FaceRegionBox; // some faces don t have region ass they are coming from keywords
|
box?: FaceRegionBox; // some faces don t have region ass they are coming from keywords
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RatingTypes = 0 | 1 | 2 | 3 | 4 | 5;
|
|
||||||
|
|
||||||
export interface PhotoMetadata extends MediaMetadata {
|
export interface PhotoMetadata extends MediaMetadata {
|
||||||
rating?: RatingTypes;
|
|
||||||
caption?: string;
|
caption?: string;
|
||||||
keywords?: string[];
|
|
||||||
cameraData?: CameraMetadata;
|
cameraData?: CameraMetadata;
|
||||||
positionData?: PositionMetaData;
|
positionData?: PositionMetaData;
|
||||||
size: MediaDimension;
|
size: MediaDimension;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import {DirectoryPathDTO} from './DirectoryDTO';
|
import {DirectoryPathDTO} from './DirectoryDTO';
|
||||||
import {MediaDimension, MediaDTO, MediaMetadata} from './MediaDTO';
|
import {MediaDimension, MediaDTO, MediaMetadata} from './MediaDTO';
|
||||||
import {PositionMetaData, CameraMetadata, RatingTypes} from './PhotoDTO';
|
|
||||||
|
|
||||||
export interface VideoDTO extends MediaDTO {
|
export interface VideoDTO extends MediaDTO {
|
||||||
id: number;
|
id: number;
|
||||||
@ -16,6 +15,4 @@ export interface VideoMetadata extends MediaMetadata {
|
|||||||
duration: number; // in milliseconds
|
duration: number; // in milliseconds
|
||||||
fileSize: number;
|
fileSize: number;
|
||||||
fps: number;
|
fps: number;
|
||||||
keywords?: string[];
|
|
||||||
rating?: RatingTypes;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user