From 69933c7a421d28f69b35b65dd231e0648a0c8449 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 1 Oct 2022 17:06:17 +0200 Subject: [PATCH] spotify: update spotify-clean to work with Pipewire 0.3.58 --- bin/spotify-clean | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bin/spotify-clean b/bin/spotify-clean index 57ed67d..dd8dae3 100755 --- a/bin/spotify-clean +++ b/bin/spotify-clean @@ -3,13 +3,7 @@ # Kill all spotify streams, except the most recent one. We need to use # the serial to know which one this is as ID are not monotonous. -pw-cli dump short client \ - | grep -F 'ap="spotify"' \ - | cut -d: -f1 \ - | while read id; do - echo $(pw-cli dump $id | sed -nE 's/^\s*object.serial = "([0-9]*)"/\1/p') $id -done \ - | sort -n \ - | cut -d' ' -f2 \ +pw-dump \ + | jq '.[]|select(.type == "PipeWire:Interface:Client" and .info.props."application.name" == "spotify").id' \ | head -n-1 \ | xargs -trn1 pw-cli destroy