-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: music
action: commit
revision:
path_from:
revision_from: 4714691d8847876131c35cbd6464700844b19175:
path_to:
revision_to:

git.thebackupbox.net

music

git://git.thebackupbox.net/music

commit 4714691d8847876131c35cbd6464700844b19175
Author: epoch <epoch@hacking.allowed.org>
Date:   Mon Dec 16 03:33:33 2019 -0600

    moved the old nowplaying code into getplaying, and nowplaying now just dumps the data from the nowplaying file

diff --git a/music-getplaying b/music-getplaying
new file mode 100755
index 0000000000000000000000000000000000000000..27afc08fe955dd70dc09f14540d30321e0799e8d
--- /dev/null
+++ b/music-getplaying
@@ -0,0 +1,9 @@
+#!/bin/sh
+FILE="/dev/null"
+if [ -f "$PREFIX/var/run/music-player.pid" ];then
+  PID="$(cat $PREFIX/var/run/music-player.pid)"
+  if [ -d /proc/$PID ];then
+    FILE=$(cat /proc/$PID/cmdline | tr '\0' '\n' | tail -n1)
+  fi
+fi
+echo $FILE
diff --git a/music-nowplaying b/music-nowplaying

index 2deb640e109767f7a9f60ce87b8a4298b91b0feb..

index ..5ee7112ae7f9f402056be82582bd8bcfb9b3f6d1 100755

--- a/music-nowplaying
+++ b/music-nowplaying
@@ -1,7 +1,2 @@
 #!/bin/sh
-if [ "$1" ];then
-  FILE=$1
-else
-  FILE=$(cat /proc/$(cat $PREFIX/var/run/music-player.pid)/cmdline | tr '\0' '\n' | tail -n1)
-fi
-echo $FILE
+cat ${PREFIX}/var/cache/music-nowplaying.txt

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

-- Response ended

-- Page fetched on Sun Jun 2 18:17:04 2024