feat(media meta): reverse geocoding from mapbox (#2922)

This commit is contained in:
Aaron Liu
2025-09-26 11:27:46 +08:00
parent 668b542c59
commit 5e5dca40c4
24 changed files with 339 additions and 35 deletions

View File

@@ -102,6 +102,10 @@ type (
MediaMetaFFProbeSizeLimit(ctx context.Context) (int64, int64)
// MediaMetaFFProbePath returns the path of ffprobe executable.
MediaMetaFFProbePath(ctx context.Context) string
// MediaMetaGeocodingEnabled returns true if media meta geocoding is enabled.
MediaMetaGeocodingEnabled(ctx context.Context) bool
// MediaMetaGeocodingMapboxAK returns the Mapbox access token.
MediaMetaGeocodingMapboxAK(ctx context.Context) string
// ThumbSize returns the size limit of thumbnails.
ThumbSize(ctx context.Context) (int, int)
// ThumbEncode returns the thumbnail encoding settings.
@@ -527,6 +531,14 @@ func (s *settingProvider) MediaMetaEnabled(ctx context.Context) bool {
return s.getBoolean(ctx, "media_meta", true)
}
func (s *settingProvider) MediaMetaGeocodingEnabled(ctx context.Context) bool {
return s.getBoolean(ctx, "media_meta_geocoding", false)
}
func (s *settingProvider) MediaMetaGeocodingMapboxAK(ctx context.Context) string {
return s.getString(ctx, "media_meta_geocoding_mapbox_ak", "")
}
func (s *settingProvider) PublicResourceMaxAge(ctx context.Context) int {
return s.getInt(ctx, "public_resource_maxage", 0)
}