mirror of
https://github.com/CoolnsX/repos_scripts.git
synced 2025-12-20 07:15:20 +05:30
accidental commit
This commit is contained in:
1
yt-music
1
yt-music
@@ -73,6 +73,7 @@ loop(){
|
||||
sleep 2
|
||||
done
|
||||
pos=$(echo '{ "command": ["get_property", "time-remaining"]}' | socat - /tmp/mpvsocket | sed -nE 's_.*data":([^\.]*).*_\1_p')
|
||||
pgrep -f "mpvsocket" >/dev/null || exit 0
|
||||
[ -z "$pos" ] && pgrep -f "mpvsocket" > /dev/null && [ -n "$(cat "$logdir/next")" ] && play "$(shuf -n1 "$logdir/next")" "$1"
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user