aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarvey Tindall <hrfee@protonmail.ch>2021-04-24 18:03:03 +0100
committerHarvey Tindall <hrfee@protonmail.ch>2021-04-24 18:03:03 +0100
commit3aec82c40c7699ef0f2930ae9793a48b7251b73f (patch)
tree6efb38d56ac6fbdfc804d78020fb1849049601fc
parenta2164b0173c5ef052ec7758ab4ddb4e301fd9c0d (diff)
downloadwaybar-mpris-3aec82c40c7699ef0f2930ae9793a48b7251b73f.tar.gz
waybar-mpris-3aec82c40c7699ef0f2930ae9793a48b7251b73f.zip
fix upload.py args for new version
-rw-r--r--.drone.yml2
-rw-r--r--README.md2
-rw-r--r--main.go9
-rwxr-xr-xwaybar-mprisbin4203301 -> 4203341 bytes
4 files changed, 6 insertions, 7 deletions
diff --git a/.drone.yml b/.drone.yml
index 062d1ff..9875891 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -14,7 +14,7 @@ steps:
- ./goreleaser.sh --snapshot --skip-publish --rm-dist
- wget https://builds.hrfee.pw/upload.py
- pip3 install requests
- - bash -c 'python3 upload.py https://builds2.hrfee.pw hrfee waybar-mpris ./dist/*.tar.gz'
+ - bash -c 'python3 upload.py https://builds2.hrfee.pw hrfee waybar-mpris --upload ./dist/*.tar.gz'
environment:
BUILDRONE_KEY:
from_secret: BUILDRONE_KEY
diff --git a/README.md b/README.md
index 7a9efd5..82b2753 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ Available on the AUR as [waybar-mpris-git](https://aur.archlinux.org/packages/wa
`go get git.hrfee.pw/hrfee/waybar-mpris` will compile from source and install.
-You can also download a precompiled binaries from [here](https://builds2.hrfee.pw/view/hrfee/waybar-mpris).
+You can also download a precompiled binary from [here](https://builds2.hrfee.pw/view/hrfee/waybar-mpris).
## Issues
Stick them on [mpris2client](https://github.com/hrfee/mpris2client) or the [og](https://github.com/hrfee/waybar-mpris) repository (both on github) if you can't make an account here.
diff --git a/main.go b/main.go
index d765d9f..eacd904 100644
--- a/main.go
+++ b/main.go
@@ -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, "&", "&amp;"),
- strings.ReplaceAll(p.Artist, "&", "&amp;"),
- )
+ out += "\"tooltip\":\"" + strings.ReplaceAll(p.Title, "&", "&amp;") + "\\n"
+ if p.Artist != "" {
+ out += "by " + strings.ReplaceAll(p.Artist, "&", "&amp;") + "\\n"
+ }
if p.Album != "" {
out += "from " + strings.ReplaceAll(p.Album, "&", "&amp;") + "\\n"
}
diff --git a/waybar-mpris b/waybar-mpris
index 71b7cd1..c69d6e4 100755
--- a/waybar-mpris
+++ b/waybar-mpris
Binary files differ