diff options
author | Damien Elmes <emms@repose.cx> | 2006-06-15 01:28:00 +0000 |
---|---|---|
committer | Damien Elmes <emms@repose.cx> | 2006-06-15 01:28:00 +0000 |
commit | 88d8dbedbab92ec5694f8f39da12e612dc72cb49 (patch) | |
tree | 4dc0e932c84f95308e1577102d3b6512890579d8 | |
parent | fa12a8d188103712777c3b8e1c3787a913809167 (diff) |
info: display progress when adding async
darcs-hash:20060615012854-4e3e3-746ce41e3529fa7177bbe9a516b24bb3b451c229.gz
-rw-r--r-- | emms-info.el | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/emms-info.el b/emms-info.el index 03a3c81..7e0bfee 100644 --- a/emms-info.el +++ b/emms-info.el @@ -60,6 +60,13 @@ This requires `later-do', which should come with EMMS." :type 'boolean :group 'emms-info) +(defcustom emms-info-report-each-num-tracks 200 + "*Non-zero will report progress information every number of tracks. +The default is to display a message every 200 tracks. +This variable is only used when adding tracks asynchronously." + :type 'integer + :group 'emms-info) + (defcustom emms-info-functions nil "*Functions which add information to tracks. Each is called with a track as argument." @@ -96,9 +103,14 @@ Return t when the track got changed." (when emms-info-asynchronously (setq emms-info-asynchronous-tracks (1- emms-info-asynchronous-tracks)) - (when (zerop emms-info-asynchronous-tracks) - (message "EMMS: All track information loaded."))) - t)) + (if (zerop emms-info-asynchronous-tracks) + (message "EMMS: All track information loaded.") + (unless (zerop emms-info-report-each-num-tracks) + (if (zerop + (mod emms-info-asynchronous-tracks + emms-info-report-each-num-tracks)) + (message "EMMS: %d tracks to go.." + emms-info-asynchronous-tracks))))))) (defun emms-info-track-file-mtime (track) "Return the mtime of the file of TRACK, if any. |