diff options
author | Mike Kazantsev <mk.fraggod@gmail.com> | 2021-10-20 01:04:11 +0500 |
---|---|---|
committer | fraggod@malediction <mk.fraggod@gmail.com> | 2021-10-20 01:04:11 +0500 |
commit | 0657a1facdf39464a0049e2abaec850da5057854 (patch) | |
tree | af56fa34557142af9bd696bc31f898d897f9cf84 | |
parent | ea6728d31c2dabb5c8c5e2cb6652fd6da2127384 (diff) |
* emms-player-mpv.el: fix calling emms-player-paused-hook twice on pause/unpause from emms
-rw-r--r-- | emms-player-mpv.el | 10 |
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) |