diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2022-12-23 08:51:37 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2022-12-23 08:51:37 +0100 |
| commit | b7f5ed4e5fcb3b51636a9dad79e7e80f7ebbb102 (patch) | |
| tree | 1a8c53db5e7fa34f683c8a0afcb8e33ff104b0a7 /wrms.go | |
| parent | 97a9b0e75a57c6b55bab8c50827f5ba4b896fd95 (diff) | |
| download | WRMS-0.0.2-alpha.tar.gz WRMS-0.0.2-alpha.zip | |
implement local storage backendv0.0.2-alpha
The 'local' backend is able to serve the music from a path specified
by '-server-music-dir'.
Add command line options to select the server port as well as a list
of backends.
Diffstat (limited to 'wrms.go')
| -rw-r--r-- | wrms.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -3,8 +3,9 @@ package main import ( "encoding/json" "fmt" + "strings" - "muhq.space/wrms/llog" + "muhq.space/go/wrms/llog" "github.com/google/uuid" @@ -63,11 +64,13 @@ type Wrms struct { CurrentSong Song Player Player Playing bool + Config Config } -func NewWrms() *Wrms { +func NewWrms(config Config) *Wrms { wrms := Wrms{} - wrms.Player = NewPlayer(&wrms) + wrms.Config = config + wrms.Player = NewPlayer(&wrms, strings.Split(config.backends, " ")) return &wrms } |
