aboutsummaryrefslogtreecommitdiff
path: root/player.go
diff options
context:
space:
mode:
Diffstat (limited to 'player.go')
-rw-r--r--player.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/player.go b/player.go
index 795978b..b8db8fa 100644
--- a/player.go
+++ b/player.go
@@ -20,6 +20,7 @@ type Player interface {
Pause()
Continue()
Stop()
+ LoadPlaylist(playlist string) []*Song
}
// command struct used to serialize player commands
@@ -253,3 +254,11 @@ func (player *MpvPlayer) Search(pattern map[string]string) chan []*Song {
return ch
}
+
+func (player *MpvPlayer) LoadPlaylist(playlist string) (songs []*Song) {
+ if strings.Contains(playlist, "spotify.com") {
+ songs = player.Backends["spotify"].(*SpotifyBackend).loadPlaylist(playlist)
+ }
+
+ return
+}