From bda55f5f49480c19c080a66a51c4686d2ab5cfbf Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Mon, 23 Jul 2007 02:03:00 +0000 Subject: emms-streams: New option emms-stream-repeat-p Instead of assuming that everyone will want to automatically repeat a streamlist if it runs out of tracks, make this controlled by the `emms-stream-repeat-p' option, which defaults to nil. darcs-hash:20070723020304-1bfb2-7ec05852decba27348abbef01daefbe8db026bbc.gz --- emms-streams.el | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/emms-streams.el b/emms-streams.el index 1179ab2..d109547 100644 --- a/emms-streams.el +++ b/emms-streams.el @@ -88,6 +88,17 @@ needed info.") (defvar emms-stream-playlist-buffer nil "The EMMS playlist buffer associated with emms-streams.") +(defcustom emms-stream-repeat-p nil + "*If non-nil, try to repeat a streamlist if it gets disconnected." + :set (function + (lambda (sym val) + (when (buffer-live-p emms-stream-playlist-buffer) + (with-current-buffer emms-stream-playlist-buffer + (setq emms-repeat-playlist val))) + (set sym val))) + :type 'boolean + :group 'emms-stream) + ;; Format: (("descriptive name" url feed-number type)) ;; ;; type could be either url, playlist, or lastfm. If url, then it @@ -239,9 +250,10 @@ This is used when `emms-stream-default-action' is \"play\"." (setq emms-stream-playlist-buffer (emms-playlist-set-playlist-buffer (emms-playlist-new))) (with-current-buffer emms-stream-playlist-buffer - ;; make sure that we continue to play the station, even if - ;; briefly disconnected - (set (make-local-variable 'emms-repeat-playlist) t)))) + ;; if emms-stream-repeat-p is non-nil, make sure that we + ;; continue to play the station, even if briefly disconnected + (set (make-local-variable 'emms-repeat-playlist) + emms-stream-repeat-p)))) (defun emms-stream-kill-playlist () "Delete the EMMS playlist associated with emms-streams, if one exists." -- cgit v1.2.3