Skip to content

Commit d640a18

Browse files
committed
fix: coderabbit suggestions
1 parent fe7ec70 commit d640a18

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/mac-player.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,17 @@ function sliceTrack()
160160

161161

162162
function remoteControl() {
163-
toggle_button="$1"
164-
back_button="$2"
165-
next_button="$3"
166-
app_controlled="$4"
163+
local toggle_button="$1"
164+
local back_button="$2"
165+
local next_button="$3"
166+
local app_controlled="$4"
167167

168168
if [[ $app_controlled == "Spotify" ]] || [[ $app_controlled == "Music" ]]; then
169169

170170
if [[ $app_controlled == "Music" ]]; then
171171
back="osascript -e 'tell application \"$app_controlled\" to back track'"
172172
else
173-
back="osascript -e 'tell application \"$app_controlled\" to set player position to 0'"
173+
back="osascript -e 'tell application \"$app_controlled\" to previous track'"
174174
fi
175175

176176
toggle="osascript -e 'tell application \"$app_controlled\" to playpause'"

0 commit comments

Comments
 (0)