aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emms-player-mpv.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/emms-player-mpv.el b/emms-player-mpv.el
index 7bf8a8c..e4a8ceb 100644
--- a/emms-player-mpv.el
+++ b/emms-player-mpv.el
@@ -675,12 +675,14 @@ Called before `emms-player-mpv-event-functions' and does same thing as these hoo
(emms-player-started emms-player-mpv))
(emms-player-mpv-event-playing-time-sync))
("pause"
- (setq emms-player-paused-p t)
- (run-hooks 'emms-player-paused-hook))
+ (unless emms-player-paused-p
+ (setq emms-player-paused-p t)
+ (run-hooks 'emms-player-paused-hook)))
("unpause"
(emms-player-mpv-event-playing-time-sync)
- (setq emms-player-paused-p nil)
- (run-hooks 'emms-player-paused-hook))
+ (when emms-player-paused-p
+ (setq emms-player-paused-p nil)
+ (run-hooks 'emms-player-paused-hook)))
("end-file"
(when (emms-player-mpv-proc-playing-p)
(emms-player-mpv-proc-playing nil)