justinmdickey / goplaying

Now Playing TUI written in Go
MIT License
21 stars 2 forks source link

Exit status 1 when spotify player is not present #1

Closed danielwerg closed 14 hours ago

danielwerg commented 1 day ago

playerctl -p spotify metadata --format "{{title}}|{{artist}}|{{album}}|{{status}}"

returns No players found

Caused by this hardcoded line: https://github.com/justinmdickey/goplaying/blob/main/main.go#L141

Proposed solitions

Let user to optionally pass player name, like so goplaying mpd or goplaying --player mpd or goplaying -p mpd to match playerctl that should only ever display info for mpd player`

danielwerg commented 14 hours ago

Resolved with https://github.com/justinmdickey/goplaying/commit/460911d0e32f1cb4508a8ea4b7ca5bf2502d2381