♻️ Song struct to hold song logic
This commit is contained in:
parent
c845d08293
commit
16933ce0fa
4 changed files with 50 additions and 7 deletions
13
mpd/current.go
Normal file
13
mpd/current.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package mpd
|
||||
|
||||
func GetCurrent() (*Song, error) {
|
||||
if connerror != nil {
|
||||
return nil, connerror
|
||||
}
|
||||
curr, err := conn.CurrentSong()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return newSong(curr), nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue