From d7f967cbb599c64d18fe951d1725bf3050597dda Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 10 Jun 2025 15:43:31 +0200 Subject: [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 Co-authored-by: kim Co-committed-by: kim --- internal/db/bundb/bundb.go | 2 +- internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/db') diff --git a/internal/db/bundb/bundb.go b/internal/db/bundb/bundb.go index bccf5ec98..ba705dd33 100644 --- a/internal/db/bundb/bundb.go +++ b/internal/db/bundb/bundb.go @@ -376,7 +376,7 @@ func sqliteConn(ctx context.Context) (*sql.DB, func() schema.Dialect, error) { // validate db address has actually been set address := config.GetDbAddress() if address == "" { - return nil, nil, fmt.Errorf("'%s' was not set when attempting to start sqlite", config.DbAddressFlag()) + return nil, nil, fmt.Errorf("'%s' was not set when attempting to start sqlite", config.DbAddressFlag) } // Build SQLite connection address with prefs. diff --git a/internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go b/internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go index fd714aa5c..ea69df0bf 100644 --- a/internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go +++ b/internal/db/bundb/migrations/20220612091800_duplicated_media_cleanup.go @@ -65,7 +65,7 @@ func init() { storageBasePath := config.GetStorageLocalBasePath() if storageBasePath == "" { - return fmt.Errorf("%s must be set to do storage migration", config.StorageLocalBasePathFlag()) + return fmt.Errorf("%s must be set to do storage migration", config.StorageLocalBasePathFlag) } return db.RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error { -- cgit v1.2.3