Skip to content

Commit

Permalink
added support for more players, explicitly youtube music
Browse files Browse the repository at this point in the history
  • Loading branch information
abenz1267 committed Feb 27, 2024
1 parent 8c973e6 commit 3e52365
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ func play(player string) {
func toggleOrStart(player string) {
s := status(player)

cmds := make(map[string]string)
cmds["YoutubeMusic"] = "youtube-music"

if s != "Playing" && s != "Paused" {
cmd := exec.Command("spotify")
toExec := player

if val, exists := cmds[player]; exists {
toExec = val
}

cmd := exec.Command(toExec)
cmd.Start()
return
}
Expand Down

0 comments on commit 3e52365

Please sign in to comment.