repo: music
action: commit
revision: 
path_from: 
revision_from: efcea0e5f8f588028789db48a4527e54d568a54d:
path_to: 
revision_to: 
git.thebackupbox.net
music
git clone git://git.thebackupbox.net/music
commit efcea0e5f8f588028789db48a4527e54d568a54d
Author: epoch 
Date:   Wed Dec 1 06:44:17 2021 +0000

    music-getplaying now outputs a URL, or it outputs a filename, instead of forcing the URL into a filepath that makes no sense.

diff --git a/music-getplaying b/music-getplaying
index af9894e898391c3b3ff37639d91af86751e4d857..
index ..11cf0a0221e649b7addb16125d86452973b830b0 100755
--- a/music-getplaying
+++ b/music-getplaying
@@ -4,7 +4,12 @@ if [ -f "${PREFIX}/run/music/player.pid" ];then
   PID="$(cat "${PREFIX}/run/music/player.pid")"
   if [ -d "/proc/${PID}" ];then
     cd "/proc/${PID}/cwd"
-    FILE="$(normalpath "$(cat "/proc/${PID}/cmdline" | tr '\0' '\n' | tail -n1)")"
+    FILE="$(cat "/proc/${PID}/cmdline" | tr '\0' '\n' | tail -n1)"
+    if printf "%s\n" "$FILE" | grep '//' >&2 >/dev/null;then
+      echo -n
+    else
+      FILE="$(normalpath "$(cat "/proc/${PID}/cmdline" | tr '\0' '\n' | tail -n1)")"
+    fi
   fi
 fi
 printf "%s\n" "$FILE"

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