File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -148,14 +148,24 @@ Returns a JSON string in the format:
148
148
(smudge-connect-when-device-active
149
149
(smudge-api-get-player-status
150
150
(lambda (status )
151
- (smudge-api-repeat (if (smudge-connect--is-repeating status) " off" " context" ))))))
151
+ (let ((is-repeating (smudge-connect--is-repeating status)))
152
+ (smudge-api-repeat (if is-repeating " off" " context" )
153
+ (lambda (_ )
154
+ (if is-repeating
155
+ (message " Repeat turned off " )
156
+ (message " Repeat turned on " )))))))))
152
157
153
158
(defun smudge-connect-toggle-shuffle ()
154
159
" Toggle shuffle for the current track."
155
160
(smudge-connect-when-device-active
156
161
(smudge-api-get-player-status
157
162
(lambda (status )
158
- (smudge-api-shuffle (if (smudge-connect--is-shuffling status) " false" " true" ))))))
163
+ (let ((is-shuffling (smudge-connect--is-shuffling status)))
164
+ (smudge-api-shuffle (if is-shuffling " false" " true" )
165
+ (lambda (_ )
166
+ (if is-shuffling
167
+ (message " Shuffling turned off " )
168
+ (message " Shuffling turned on " )))))))))
159
169
160
170
(defun smudge-connect-get-device-id (player-status )
161
171
" Get the id if from PLAYER-STATUS of the currently playing device, if any."
You can’t perform that action at this time.
0 commit comments