v0.8.0: enrich XMP metadata
pipeline / test (push) Has been cancelled
pipeline / build (push) Has been cancelled

This commit is contained in:
Ein Anderssono
2026-06-15 01:21:49 +02:00
parent 4fe4c15adf
commit fffb30023b
16 changed files with 791 additions and 107 deletions
+12
View File
@@ -9,6 +9,7 @@ type Bridge interface {
RequestAccess() error
ListAlbums() ([]Album, error)
ListAssets(albumID string) ([]Asset, int, error)
ReverseGeocode(latitude, longitude float64) (Placemark, error)
ListTree() ([]CollectionNode, error)
ExportPreview(assetID, outputDir string, targetSize, quality, index int) (ExportResult, error)
ExportOriginal(assetID, outputDir string, index int) (ExportResult, error)
@@ -39,6 +40,17 @@ func ParseAssetsJSON(jsonStr string) ([]Asset, int, error) {
return resp.Assets, resp.Total, nil
}
func ParsePlacemarkJSON(jsonStr string) (Placemark, error) {
var resp PlacemarkResponse
if err := json.Unmarshal([]byte(jsonStr), &resp); err != nil {
return Placemark{}, err
}
if resp.Error != "" {
return Placemark{}, fmt.Errorf("%s", resp.Error)
}
return resp.Placemark, nil
}
func ParseTreeJSON(jsonStr string) ([]CollectionNode, error) {
var errResp ErrorResponse
if err := json.Unmarshal([]byte(jsonStr), &errResp); err == nil && errResp.Error != "" {