aboutsummaryrefslogtreecommitdiff
path: root/pkg/database
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/database')
-rw-r--r--pkg/database/repository/settings.go5
-rw-r--r--pkg/database/sql/settings.go11
2 files changed, 10 insertions, 6 deletions
diff --git a/pkg/database/repository/settings.go b/pkg/database/repository/settings.go
index 6ed1eb6..c3d8fbb 100644
--- a/pkg/database/repository/settings.go
+++ b/pkg/database/repository/settings.go
@@ -4,8 +4,9 @@ import "context"
type (
Settings struct {
- ShowMode bool
- ShowOwner bool
+ ShowMode bool
+ ShowOwner bool
+ PreloadVideoMetadata bool
}
SettingsRepository interface {
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
}