When mpd is paused or stopped, kill the streaming process
This commit is contained in:
parent
4005c3fc2c
commit
076ea9d295
1 changed files with 8 additions and 1 deletions
9
empc.el
9
empc.el
|
|
@ -443,7 +443,8 @@ According to what is in the diff, several actions can be performed:
|
|||
(setq notify '(lambda () (when (empc-playlist-songs empc-object)
|
||||
(empc-echo-song)))))
|
||||
(empc-stream-start))
|
||||
(setq notify '(lambda () (empc-echo-notify (symbol-name (plist-get status-diff :state)))))))
|
||||
(setq notify '(lambda () (empc-echo-notify (symbol-name (plist-get status-diff :state)))))
|
||||
(empc-stream-stop)))
|
||||
(when (or (plist-member status-diff :repeat) (plist-member status-diff :random)
|
||||
(plist-member status-diff :single) (plist-member status-diff :consume)
|
||||
(plist-member status-diff :xfade))
|
||||
|
|
@ -806,6 +807,12 @@ If the stream process is killed for whatever the reason, pause mpd if possible."
|
|||
(set-process-sentinel stream-process 'empc-stream-process-sentinel)
|
||||
(setq empc-stream-process stream-process))))
|
||||
|
||||
(defun empc-stream-stop()
|
||||
"Stop the stream process."
|
||||
(let ((stream-process (empc-stream empc-object)))
|
||||
(when stream-process
|
||||
(delete-process stream-process))))
|
||||
|
||||
(defun empc-playlist-mode ()
|
||||
"empc playlist mode."
|
||||
(use-local-map empc-playlist-map)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue