aboutsummaryrefslogtreecommitdiff
path: root/emms-streams.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2007-07-23 02:03:00 +0000
committerMichael Olson <mwolson@gnu.org>2007-07-23 02:03:00 +0000
commitbda55f5f49480c19c080a66a51c4686d2ab5cfbf (patch)
tree3ae2e021de5eef9f46e08a1ed79c0cda4edd6926 /emms-streams.el
parent0c4c096ff27aa9dcd54a7510e7eae97585088639 (diff)
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
Diffstat (limited to 'emms-streams.el')
-rw-r--r--emms-streams.el18
1 files 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."