[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mpv 1d2629ba36 4/4: Allow to customize timeout used in mpv
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mpv 1d2629ba36 4/4: Allow to customize timeout used in mpv-start |
Date: |
Mon, 1 Aug 2022 07:58:51 -0400 (EDT) |
branch: elpa/mpv
commit 1d2629ba364baf40c2ff27dc8e62d0f0c5caec6d
Author: Johann Klähn <johann@jklaehn.de>
Commit: Johann Klähn <johann@jklaehn.de>
Allow to customize timeout used in mpv-start
Closes #15, closes #25.
Co-authored-by: yuchen <yuchen.lea@gmail.com>
---
mpv.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/mpv.el b/mpv.el
index 19a25aabfe..26f022f0d9 100644
--- a/mpv.el
+++ b/mpv.el
@@ -49,6 +49,11 @@
:type '(repeat string)
:group 'mpv)
+(defcustom mpv-start-timeout 0.5
+ "Maximum time in seconds that `mpv-start' blocks while waiting for mpv."
+ :type 'number
+ :group 'mpv)
+
(defcustom mpv-speed-step 1.10
"Scale factor used when adjusting playback speed."
:type 'number
@@ -113,8 +118,8 @@ prepended to ARGS."
(with-demoted-errors (delete-file socket)))
(run-hooks 'mpv-on-exit-hook))))
(with-timeout
- (0.5 (mpv-kill)
- (error "Failed to connect to mpv"))
+ (mpv-start-timeout (mpv-kill)
+ (error "Failed to connect to mpv"))
(while (not (file-exists-p socket))
(sleep-for 0.05)))
(setq mpv--queue (tq-create