repo: music
action: commit
revision: 
path_from: 
revision_from: 9bb41da1c6f3580115f058d45fa3ff560191c9fa:
path_to: 
revision_to: 
git.thebackupbox.net
music
git clone git://git.thebackupbox.net/music
commit 9bb41da1c6f3580115f058d45fa3ff560191c9fa
Author: epoch 
Date:   Sat Nov 13 01:53:13 2021 +0000

    removed some error messages, attempted to better escape data

diff --git a/music-pushmeta b/music-pushmeta
index cacc076d7a848b29ccf9be832b39e630bcbc82f7..
index ..3761079b4a41a5658dbd46f72abe1a7f8029fca9 100755
--- a/music-pushmeta
+++ b/music-pushmeta
@@ -4,10 +4,11 @@ if [ "$1" = "-f" ];then
   force=1
   shift
 fi
-uri="$(cat ${PREFIX}/run/music/pushuri)"
+uri="$(cat ${PREFIX}/run/music/pushuri 2>/dev/null)"
+echo $uri
 if [ "$force" = 0 ];then
   if [ ! "$uri" ];then
-    printf "not pushing audio. no where to send it to.\n" >&2
+    logger "we are currently not pushing audio to anywhere. not sending metadata to nowhere.\n"
     exit 1
   fi
 fi
@@ -19,8 +20,6 @@ creds="${user}:${pass}"
 host="${domain}:${port}"
 if [ "$force" = 0 ];then
   if ! lsof "-i@${host}";then
-    printf "not pushing audio to %s, so not sending metadata.\n" "${host}" >&2
-    printf "also going to clear the pushuri file to help prevent cred leaks.\n" >&2
     rm -f "${PREFIX}/run/music/pushrui"
     exit 2
   fi
@@ -29,4 +28,4 @@ printf "GET /admin/metadata?mode=updinfo&mount=/&title=%s HTTP/1.1\r
 Host: %s\r
 Authorization: Basic %s\r
 \r
-" "$(uriescape "$*" | sed 's/\&/%26/g')" "${host}" "$(printf "%s\n" "$creds" | base64)" | ncat "${domain}" "${port}"
+" "$(uriescape "$*" | sed 's/\&/%26/g' | sed 's/\=/%3d/g')" "${host}" "$(printf "%s\n" "$creds" | base64)" | ncat "${domain}" "${port}"

-----END OF PAGE-----