diff options
Diffstat (limited to 'bongo.el')
-rw-r--r-- | bongo.el | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -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) |