summaryrefslogtreecommitdiff
path: root/bongo.el
diff options
context:
space:
mode:
Diffstat (limited to 'bongo.el')
-rw-r--r--bongo.el29
1 files changed, 16 insertions, 13 deletions
diff --git a/bongo.el b/bongo.el
index c78e723..8234c07 100644
--- a/bongo.el
+++ b/bongo.el
@@ -644,19 +644,22 @@ Modified by Durand."
Also fetch the time-pos initially.
Afterwards just stop the annoying timer."
- (bongo--run-mpv-command player "time-pos" "get_property" "time-pos")
- (let ((timer (bongo-player-get player 'timer)))
- (cond
- ;; ((or (not (bongo-player-running-p player))
- ;; (and (bongo-player-get player 'socket)
- ;; (not (equal (process-status (bongo-player-get player 'socket))
- ;; 'open))))
- ;; (bongo-mpv-player-stop-timer player))
- ((null (bongo-player-total-time player))
- (bongo--run-mpv-command player "duration" "get_property" "duration"))
- ;; ((null (bongo-player-get player 'metadata-fetched))
- ;; (bongo--run-mpv-command player "metadata" "get_property" "metadata"))
- (t (bongo-mpv-player-stop-timer player)))))
+ (condition-case nil
+ (progn
+ (bongo--run-mpv-command player "time-pos" "get_property" "time-pos")
+ (let ((timer (bongo-player-get player 'timer)))
+ (cond
+ ;; ((or (not (bongo-player-running-p player))
+ ;; (and (bongo-player-get player 'socket)
+ ;; (not (equal (process-status (bongo-player-get player 'socket))
+ ;; 'open))))
+ ;; (bongo-mpv-player-stop-timer player))
+ ((null (bongo-player-total-time player))
+ (bongo--run-mpv-command player "duration" "get_property" "duration"))
+ ;; ((null (bongo-player-get player 'metadata-fetched))
+ ;; (bongo--run-mpv-command player "metadata" "get_property" "metadata"))
+ (t (bongo-mpv-player-stop-timer player)))))
+ (error (bongo-mpv-player-stop-timer player))))
;;;###autoload
(advice-add #'bongo-mpv-player-tick :override #'durand-bongo-mpv-player-tick)