From ec320ca6d98d0ec22ce286bb8ed8ce99ee6aa0a5 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 19 Aug 2007 15:37:00 +0000 Subject: emms-lastfm: New option emms-lastfm-submission-verbose-p This controls whether EMMS notifies the user every time a track is submitted. The default is not to do so. darcs-hash:20070819153739-1bfb2-89fecc3a7a5a66330a3608466b2d37967ad200ed.gz --- emms-lastfm.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'emms-lastfm.el') diff --git a/emms-lastfm.el b/emms-lastfm.el index 2d7493c..ebbed86 100644 --- a/emms-lastfm.el +++ b/emms-lastfm.el @@ -96,6 +96,11 @@ :type 'string :group 'emms-lastfm) +(defcustom emms-lastfm-submission-verbose-p nil + "If non-nil, display a message every time we submit a track to Last.fm." + :type 'boolean + :group 'emms-lastfm) + (defconst emms-lastfm-server "http://post.audioscrobbler.com/" "The last.fm server responsible for the handshaking procedure. Only for internal use.") @@ -264,6 +269,7 @@ last.fm." 'info-playing-time))) (date (format-time-string "%Y-%m-%d %H:%M:%S" (current-time) t)) (url-http-attempt-keepalives nil) + (url-show-status emms-lastfm-submission-verbose-p) (url-request-method "POST") (url-request-extra-headers '(("Content-type" . @@ -291,8 +297,9 @@ well or if an error occured." (goto-char (point-min)) (if (re-search-forward "^OK$" nil t) (progn - (message "EMMS: \"%s\" submitted to last.fm" - (emms-track-description emms-lastfm-current-track)) + (when emms-lastfm-submission-verbose-p + (message "EMMS: \"%s\" submitted to last.fm" + (emms-track-description emms-lastfm-current-track))) (kill-buffer buffer)) (message "EMMS: Song couldn't be submitted to last.fm") (goto-char (point-min)) -- cgit v1.2.3