diff options
| author | 2025-06-10 15:43:31 +0200 | |
|---|---|---|
| committer | 2025-06-10 15:43:31 +0200 | |
| commit | d7f967cbb599c64d18fe951d1725bf3050597dda (patch) | |
| tree | 061a302732684980e3dbf3f1a6012f3cbef01e26 /internal/config/defaults.go | |
| parent | [chore] Update interactionPolicy sub-policy parsing in line with documented d... (diff) | |
| download | gotosocial-d7f967cbb599c64d18fe951d1725bf3050597dda.tar.xz | |
[feature] configurable maximum thumbnail dimensions (#4258)
- adds configuration for thumbnail maximum dimensions with warning on exceeding recommendations
- moves the media configuration vars into their own sub-struct
- replaces the configuration flag funcs with simple string consts
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4258
Reviewed-by: tobi <kipvandenbos@noreply.codeberg.org>
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/config/defaults.go')
| -rw-r--r-- | internal/config/defaults.go | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/internal/config/defaults.go b/internal/config/defaults.go index c960d526c..6506e3e58 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -78,16 +78,19 @@ var Defaults = Configuration{ AccountsCustomCSSLength: 10000, AccountsMaxProfileFields: 6, - MediaDescriptionMinChars: 0, - MediaDescriptionMaxChars: 1500, - MediaRemoteCacheDays: 7, - MediaLocalMaxSize: 40 * bytesize.MiB, - MediaRemoteMaxSize: 40 * bytesize.MiB, - MediaEmojiLocalMaxSize: 50 * bytesize.KiB, - MediaEmojiRemoteMaxSize: 100 * bytesize.KiB, - MediaCleanupFrom: "00:00", // Midnight. - MediaCleanupEvery: 24 * time.Hour, // 1/day. - MediaFfmpegPoolSize: 1, + Media: MediaConfiguration{ + DescriptionMinChars: 0, + DescriptionMaxChars: 1500, + RemoteCacheDays: 7, + LocalMaxSize: 40 * bytesize.MiB, + RemoteMaxSize: 40 * bytesize.MiB, + EmojiLocalMaxSize: 50 * bytesize.KiB, + EmojiRemoteMaxSize: 100 * bytesize.KiB, + CleanupFrom: "00:00", // Midnight. + CleanupEvery: 24 * time.Hour, // 1/day. + FfmpegPoolSize: 1, + ThumbMaxPixels: 512, + }, StorageBackend: "local", StorageLocalBasePath: "/gotosocial/storage", |
