diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2022-07-21 21:48:59 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2022-07-21 21:48:59 +0200 |
| commit | 8171af55daad6ce9a5cdacf95527801e83f25c08 (patch) | |
| tree | 0e879a159bea07624687586df78f5a99d344396f /dummyBackend.go | |
| parent | 8b4335c18752ce96e452dc232e57695c2fdf6a6d (diff) | |
| download | WRMS-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.go | 8 |
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))) } |
