Skip to content

Commit

Permalink
feat: only resume if other playing gets closed, not just paused
Browse files Browse the repository at this point in the history
  • Loading branch information
abenz1267 committed Feb 10, 2023
1 parent 82a9524 commit 5685647
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions autopause.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"os/exec"
"strings"
"time"
)

type PlayerStatus struct {
Expand Down Expand Up @@ -35,9 +34,9 @@ func autopause(players []string) {
}
}
} else if val.player != stopped && stopped != "" {
time.Sleep(1 * time.Second)
s := status(stopper)

if status(stopper) != "Playing" {
if s != "Playing" && s != "Paused" {
play(stopped)
stopped = ""
stopper = ""
Expand Down

0 comments on commit 5685647

Please sign in to comment.