1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-23 01:27:14 +02: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:
Graham Alderson 2023-11-26 10:53:08 +12:00
parent 6db3472ca6
commit 702b55c912
3 changed files with 4 additions and 7 deletions

View File

@ -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 {

View File

@ -26,12 +26,8 @@ export interface FaceRegion {
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 {
rating?: RatingTypes;
caption?: string;
keywords?: string[];
cameraData?: CameraMetadata;
positionData?: PositionMetaData;
size: MediaDimension;

View File

@ -1,6 +1,5 @@
import {DirectoryPathDTO} from './DirectoryDTO';
import {MediaDimension, MediaDTO, MediaMetadata} from './MediaDTO';
import {PositionMetaData, CameraMetadata, RatingTypes} from './PhotoDTO';
export interface VideoDTO extends MediaDTO {
id: number;
@ -16,6 +15,4 @@ export interface VideoMetadata extends MediaMetadata {
duration: number; // in milliseconds
fileSize: number;
fps: number;
keywords?: string[];
rating?: RatingTypes;
}