2023-09-27 20:44:51 +02:00
|
|
|
import { Tags } from 'exiftool-vendored';
|
|
|
|
import { InitOptions } from 'local-reverse-geocoder';
|
|
|
|
|
|
|
|
export const IMetadataRepository = 'IMetadataRepository';
|
|
|
|
|
|
|
|
export interface GeoPoint {
|
|
|
|
latitude: number;
|
|
|
|
longitude: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ReverseGeocodeResult {
|
|
|
|
country: string | null;
|
|
|
|
state: string | null;
|
|
|
|
city: string | null;
|
|
|
|
}
|
|
|
|
|
2023-09-27 21:17:18 +02:00
|
|
|
export interface ImmichTags extends Omit<Tags, 'FocalLength'> {
|
2023-09-27 20:44:51 +02:00
|
|
|
ContentIdentifier?: string;
|
|
|
|
MotionPhoto?: number;
|
|
|
|
MotionPhotoVersion?: number;
|
|
|
|
MotionPhotoPresentationTimestampUs?: number;
|
|
|
|
MediaGroupUUID?: string;
|
|
|
|
ImagePixelDepth?: string;
|
2023-09-27 21:17:18 +02:00
|
|
|
FocalLength?: number;
|
2023-09-27 20:44:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMetadataRepository {
|
|
|
|
init(options: Partial<InitOptions>): Promise<void>;
|
|
|
|
reverseGeocode(point: GeoPoint): Promise<ReverseGeocodeResult>;
|
|
|
|
deleteCache(): Promise<void>;
|
|
|
|
getExifTags(path: string): Promise<ImmichTags | null>;
|
|
|
|
}
|