aboutsummaryrefslogtreecommitdiff
path: root/dummyBackend.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2022-07-21 21:48:59 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2022-07-21 21:48:59 +0200
commit8171af55daad6ce9a5cdacf95527801e83f25c08 (patch)
tree0e879a159bea07624687586df78f5a99d344396f /dummyBackend.go
parent8b4335c18752ce96e452dc232e57695c2fdf6a6d (diff)
downloadWRMS-8171af55daad6ce9a5cdacf95527801e83f25c08.tar.gz
WRMS-8171af55daad6ce9a5cdacf95527801e83f25c08.zip
WIP spotify playback commit
* display spotify search results in search overlay * synchronously play songs added from search
Diffstat (limited to 'dummyBackend.go')
-rw-r--r--dummyBackend.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/dummyBackend.go b/dummyBackend.go
index f2eae57..d4461db 100644
--- a/dummyBackend.go
+++ b/dummyBackend.go
@@ -7,7 +7,7 @@ import (
type DummyBackend struct{}
-func (dummy *DummyBackend) Play(song Song) {
+func (dummy *DummyBackend) Play(song *Song) {
}
func (dummy *DummyBackend) Pause() {
@@ -19,11 +19,9 @@ func (dummy *DummyBackend) Search(keyword string) []Song {
return []Song{s}
}
-func NewDummySong(title string, artist string) Song {
- s := Song{title, artist, "dummy", "", 0, 0, map[string]struct{}{}, map[string]struct{}{}}
+func NewDummySong(title, artist string) Song {
h := sha1.New()
h.Write([]byte(title))
h.Write([]byte(artist))
- s.Uri = base64.URLEncoding.EncodeToString(h.Sum(nil))
- return s
+ return NewSong(title, artist, "dummy", base64.URLEncoding.EncodeToString(h.Sum(nil)))
}