2020-02-24 23:30:08 +01:00
|
|
|
package models
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2020-07-10 14:26:19 +02:00
|
|
|
type MediaEXIF struct {
|
2020-11-28 21:29:31 +01:00
|
|
|
Model
|
2022-03-28 17:08:30 +02:00
|
|
|
Description *string
|
2020-02-24 23:30:08 +01:00
|
|
|
Camera *string
|
|
|
|
Maker *string
|
|
|
|
Lens *string
|
|
|
|
DateShot *time.Time
|
2021-03-31 23:35:14 +02:00
|
|
|
Exposure *float64
|
2020-02-24 23:30:08 +01:00
|
|
|
Aperture *float64
|
2021-03-20 00:26:05 +01:00
|
|
|
Iso *int64
|
2020-02-24 23:30:08 +01:00
|
|
|
FocalLength *float64
|
2021-03-28 23:52:51 +02:00
|
|
|
Flash *int64
|
2021-03-20 00:26:05 +01:00
|
|
|
Orientation *int64
|
2021-03-23 21:36:03 +01:00
|
|
|
ExposureProgram *int64
|
2020-08-11 14:46:23 +02:00
|
|
|
GPSLatitude *float64
|
2021-01-29 00:23:40 +01:00
|
|
|
GPSLongitude *float64
|
2020-02-24 23:30:08 +01:00
|
|
|
}
|
2020-11-28 21:29:31 +01:00
|
|
|
|
2020-11-28 21:49:33 +01:00
|
|
|
func (MediaEXIF) TableName() string {
|
|
|
|
return "media_exif"
|
|
|
|
}
|
|
|
|
|
2020-11-28 21:29:31 +01:00
|
|
|
func (exif *MediaEXIF) Media() *Media {
|
|
|
|
panic("not implemented")
|
|
|
|
}
|
2021-10-03 15:36:10 +02:00
|
|
|
|
|
|
|
func (exif *MediaEXIF) Coordinates() *Coordinates {
|
|
|
|
if exif.GPSLatitude == nil || exif.GPSLongitude == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &Coordinates{
|
|
|
|
Latitude: *exif.GPSLatitude,
|
|
|
|
Longitude: *exif.GPSLongitude,
|
|
|
|
}
|
|
|
|
}
|