From 507561c236b4c5723cbbc12939e26ce7712f0b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Darm=C3=BCntzel?= Date: Fri, 27 Nov 2026 23:58:20 +0100 Subject: [PATCH] fix(macos): set shuffle with Music's shuffle property in `music shuffle` (#13365) --- plugins/macos/music | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/plugins/macos/music b/plugins/macos/music index 50566797b..d542d179f 100644 --- a/plugins/macos/music +++ b/plugins/macos/music @@ -72,11 +72,6 @@ EOF return 0 ;; shuf|shuff|shuffle) - # The shuffle property of current playlist can't be changed in iTunes 12, - # so this workaround uses AppleScript to simulate user input instead. - # Defaults to toggling when no options are given. - # The toggle option depends on the shuffle button being visible in the Now playing area. - # On and off use the menu bar items. local state=$1 if [[ -n "$state" && "$state" != (on|off|toggle) ]]; then @@ -85,16 +80,24 @@ EOF fi case "$state" in - on|off) - # Inspired by: https://stackoverflow.com/a/14675583 - osascript >/dev/null 2>&1 </dev/null 2>&1 </dev/null <