diff options
Diffstat (limited to 'pkg/database/sql')
-rw-r--r-- | pkg/database/sql/settings.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkg/database/sql/settings.go b/pkg/database/sql/settings.go index 4e73878..3f4ad08 100644 --- a/pkg/database/sql/settings.go +++ b/pkg/database/sql/settings.go @@ -11,8 +11,9 @@ import ( type ( Settings struct { gorm.Model - ShowMode bool - ShowOwner bool + ShowMode bool + ShowOwner bool + PreloadVideoMetadata bool } SettingsRepository struct { @@ -51,6 +52,7 @@ func (self *SettingsRepository) Save(ctx context.Context, toSaveSettings *reposi s.ShowMode = toSaveSettings.ShowMode s.ShowOwner = toSaveSettings.ShowOwner + s.PreloadVideoMetadata = toSaveSettings.PreloadVideoMetadata result := db.Save(s) return result.Error @@ -63,7 +65,8 @@ func (self *SettingsRepository) Load(ctx context.Context) (*repository.Settings, } return &repository.Settings{ - ShowMode: s.ShowMode, - ShowOwner: s.ShowOwner, + ShowMode: s.ShowMode, + ShowOwner: s.ShowOwner, + PreloadVideoMetadata: s.PreloadVideoMetadata, }, nil } |