diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-11-20 14:44:24 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-11-20 14:44:24 +0300 |
commit | 6bb667ae822cca86d195d4398bb7f19feaf7d9eb (patch) | |
tree | df9eb8489c4c365372dcaa74526b0b0d9e35888a | |
parent | 07ca4c3ff48d490ec1b9ee3b0ff7a992016577ca (diff) | |
download | waybar-mpris-6bb667ae822cca86d195d4398bb7f19feaf7d9eb.tar.gz waybar-mpris-6bb667ae822cca86d195d4398bb7f19feaf7d9eb.zip |
-rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -201,7 +201,6 @@ func formatOutput(p *player, icon string, fstr string, maxTitleLen int) string { case tokPosition: var position string if p.Length > 0 { - p.GetPosition() position = secondsToString(int(p.Position / 1000000)) } else { position = secondsToString(0) @@ -646,6 +645,7 @@ func main() { time.Sleep(POLL * time.Millisecond) if len(players.mpris2.List) != 0 { if players.mpris2.List[players.mpris2.Current].Playing { + players.mpris2.List[players.mpris2.Current].GetPosition() go fmt.Fprintln(writer, players.JSON()) } } |