diff --git a/pkg/player/playerctl.go b/pkg/player/playerctl.go index 379b92b..130f4a6 100644 --- a/pkg/player/playerctl.go +++ b/pkg/player/playerctl.go @@ -89,3 +89,19 @@ func Status(onChange func(bool)) error { } return nil } + +func CurrentMetadata(key string) (string, error) { + out, err := exec.Command("playerctl", "metadata", key).Output() + if err != nil { + return "", err + } + return string(out), nil +} + +func CurrentStatus() (string, error) { + out, err := exec.Command("playerctl", "status").Output() + if err != nil { + return "", err + } + return string(out), nil +}