aboutsummaryrefslogtreecommitdiff
path: root/dummyBackend.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2022-12-23 08:51:37 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2022-12-23 08:51:37 +0100
commitb7f5ed4e5fcb3b51636a9dad79e7e80f7ebbb102 (patch)
tree1a8c53db5e7fa34f683c8a0afcb8e33ff104b0a7 /dummyBackend.go
parent97a9b0e75a57c6b55bab8c50827f5ba4b896fd95 (diff)
downloadWRMS-b7f5ed4e5fcb3b51636a9dad79e7e80f7ebbb102.tar.gz
WRMS-b7f5ed4e5fcb3b51636a9dad79e7e80f7ebbb102.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 'dummyBackend.go')
-rw-r--r--dummyBackend.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/dummyBackend.go b/dummyBackend.go
deleted file mode 100644
index 460dd5e..0000000
--- a/dummyBackend.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package main
-
-import (
- "crypto/sha1"
- "encoding/base64"
-)
-
-type DummyBackend struct{}
-
-func (dummy *DummyBackend) Play(song *Song, player *Player) {
-}
-
-func (dummy *DummyBackend) Search(keyword string) []Song {
-
- s := NewDummySong("Dummy Mc Crashtest", "exactly "+keyword)
- return []Song{s}
-}
-
-func NewDummySong(title, artist string) Song {
- h := sha1.New()
- h.Write([]byte(title))
- h.Write([]byte(artist))
- return NewSong(title, artist, "dummy", base64.URLEncoding.EncodeToString(h.Sum(nil)))
-}