diff options
| author | davy wybiral <davy.wybiral@gmail.com> | 2019-07-03 13:25:42 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-03 13:25:42 -0500 |
| commit | deb6808c75b54ac23f3332ac32525b475dd267f3 (patch) | |
| tree | 7445f31f9079b3a794f6aaeed7d41db97f506938 /pkg/app/config.go | |
| parent | 4fc389edcbdb8275071050b316ff15ae3bdf8fda (diff) | |
Multipath (#10)
* added multiple paths
* prevent path duplicates
Diffstat (limited to 'pkg/app/config.go')
| -rw-r--r-- | pkg/app/config.go | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/pkg/app/config.go b/pkg/app/config.go index f8ca2e8..c2ecb45 100644 --- a/pkg/app/config.go +++ b/pkg/app/config.go @@ -7,9 +7,15 @@ import ( // Config settings for main App. type Config struct { - LibraryPath string `json:"library"` - Server *ServerConfig `json:"server"` - Feed *FeedConfig `json:"feed"` + Library []*PathConfig `json:"library"` + Server *ServerConfig `json:"server"` + Feed *FeedConfig `json:"feed"` +} + +// PathConfig settings for media library path. +type PathConfig struct { + Path string `json:"path"` + Prefix string `json:"prefix"` } // ServerConfig settings for App Server. @@ -34,7 +40,12 @@ type FeedConfig struct { // DefaultConfig returns Config initialized with default values. func DefaultConfig() *Config { return &Config{ - LibraryPath: "videos", + Library: []*PathConfig{ + &PathConfig{ + Path: "videos", + Prefix: "", + }, + }, Server: &ServerConfig{ Host: "127.0.0.1", Port: 0, |
