Skip to content

Commit 40ce9b7

Browse files
committed
patch: solving the remote control feature errors
1 parent 9ebbb77 commit 40ce9b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/mac-player.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ function remoteControl() {
172172
else
173173
back="osascript -e 'tell application \"$app_controlled\" to set player position to 0'"
174174
fi
175+
175176
toggle="osascript -e 'tell application \"$app_controlled\" to playpause'"
176177
next="osascript -e 'tell application \"$app_controlled\" to play next track'"
177178

@@ -212,11 +213,13 @@ main() {
212213
PLAY_PAUSE_BUTTON=$(get_tmux_option "@dracula-mac-player-remote-play-pause" "P")
213214
BACK_BUTTON=$(get_tmux_option "@dracula-mac-player-remote-back" "R")
214215
NEXT_BUTTON=$(get_tmux_option "@dracula-mac-player-remote-next" "N")
216+
215217
remoteControl "$PLAY_PAUSE_BUTTON" "$BACK_BUTTON" "$NEXT_BUTTON" "$REMOTE_APP"
216218
fi
217219

218220
if [ ! -f "$cache_file" ] || [ $(($(date +%s) - $(stat -f%c "$cache_file"))) -ge "$RATE" ]; then
219221
local full_track
222+
220223
full_track=$(trackStatus "$PAUSE_ICON" "$PLAY_ICON")
221224
sliceTrack "$full_track" "$MAX_LENGTH" > "$cache_file"
222225
fi

0 commit comments

Comments
 (0)