From 4ca15b049d6c7181d28c2135ee8968250422b69e Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 27 Jul 2022 22:30:34 +0200 Subject: [PATCH] spotify: reenable spotify-clean It seems the logic is OK. Just log the output of pw-cli dump short. --- bin/spotify-clean | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/spotify-clean b/bin/spotify-clean index bb78790..f0726dd 100755 --- a/bin/spotify-clean +++ b/bin/spotify-clean @@ -1,10 +1,10 @@ #!/bin/sh -# Kill all spotify streams, except the most recent (old?) one. +# Kill all spotify streams, except the most recent one. -exit 0 +pw-cli dump short | grep spotify pw-cli dump short client \ | grep -F 'ap="spotify"' \ - | tail -n+2 \ + | head -n-1 \ | cut -d: -f1 \ | xargs -rn1 pw-cli destroy