Checkpoint
This commit is contained in:
138 files changed
+1898
-57607
No files matched your search
@@ -3,9 +3,9 @@ package volumio
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.maze.io/go/bragi/config"
|
||||
"git.maze.io/go/bragi/player"
|
||||
"git.maze.io/go/bragi/player/mpd"
|
||||
"go.maze.io/harmon/config"
|
||||
"go.maze.io/harmon/player"
|
||||
"go.maze.io/harmon/player/mpd"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -13,7 +13,7 @@ const (
|
||||
)
|
||||
|
||||
func init() {
|
||||
player.Register("volumio", func(config *config.Player) (player.Player, error) {
|
||||
player.Register("volumio", func(config config.Player) (player.Player, error) {
|
||||
return New(config)
|
||||
}, Detect, 1)
|
||||
}
|
||||
@@ -22,9 +22,9 @@ type Player struct {
|
||||
mpd *mpd.Player
|
||||
}
|
||||
|
||||
func New(config *config.Player) (player.Player, error) {
|
||||
func New(config config.Player) (player.Player, error) {
|
||||
//return new(Player), nil
|
||||
m, err := mpd.New(config.Host, config.Password, config.Name)
|
||||
m, err := mpd.New(config.Host, config.Password)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -34,7 +34,9 @@ func New(config *config.Player) (player.Player, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (Player) Name() string { return "volumio" }
|
||||
func (p *Player) Halt() error { return p.mpd.Halt() }
|
||||
func (Player) Type() string { return "volumio" }
|
||||
func (Player) Name() string { return "Volumio" }
|
||||
func (p *Player) Status() *player.Status { return p.mpd.Status() }
|
||||
func (p *Player) Next() error { return p.mpd.Next() }
|
||||
func (p *Player) Previous() error { return p.mpd.Previous() }
|
||||
|
||||
Reference in new issue
Block a user