summaryrefslogtreecommitdiff
path: root/pkg/app/config.go
diff options
context:
space:
mode:
authordavy wybiral <davy.wybiral@gmail.com>2019-07-03 13:25:42 -0500
committerGitHub <noreply@github.com>2019-07-03 13:25:42 -0500
commitdeb6808c75b54ac23f3332ac32525b475dd267f3 (patch)
tree7445f31f9079b3a794f6aaeed7d41db97f506938 /pkg/app/config.go
parent4fc389edcbdb8275071050b316ff15ae3bdf8fda (diff)
Multipath (#10)
* added multiple paths * prevent path duplicates
Diffstat (limited to 'pkg/app/config.go')
-rw-r--r--pkg/app/config.go19
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,