diff options
author | Harvey Tindall <hrfee@protonmail.ch> | 2021-04-24 18:03:03 +0100 |
---|---|---|
committer | Harvey Tindall <hrfee@protonmail.ch> | 2021-04-24 18:03:03 +0100 |
commit | 3aec82c40c7699ef0f2930ae9793a48b7251b73f (patch) | |
tree | 6efb38d56ac6fbdfc804d78020fb1849049601fc /main.go | |
parent | a2164b0173c5ef052ec7758ab4ddb4e301fd9c0d (diff) | |
download | waybar-mpris-3aec82c40c7699ef0f2930ae9793a48b7251b73f.tar.gz waybar-mpris-3aec82c40c7699ef0f2930ae9793a48b7251b73f.zip |
fix upload.py args for new version
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -97,11 +97,10 @@ func playerJSON(p *mpris2.Player) string { text += v + right } out += "\",\"text\":\"" + text + "\"," - out += "\"tooltip\":\"" + fmt.Sprintf( - "%s\\nby %s\\n", - strings.ReplaceAll(p.Title, "&", "&"), - strings.ReplaceAll(p.Artist, "&", "&"), - ) + out += "\"tooltip\":\"" + strings.ReplaceAll(p.Title, "&", "&") + "\\n" + if p.Artist != "" { + out += "by " + strings.ReplaceAll(p.Artist, "&", "&") + "\\n" + } if p.Album != "" { out += "from " + strings.ReplaceAll(p.Album, "&", "&") + "\\n" } |