diff options
author | Michael Olson <mwolson@gnu.org> | 2008-08-07 23:17:55 -0700 |
---|---|---|
committer | Michael Olson <mwolson@gnu.org> | 2008-08-07 23:17:55 -0700 |
commit | 616f160c7f783dc232f68ea6ab8b40a36f690b18 (patch) | |
tree | c5c476778d934efcb2972c38438c02aeeecd0c9f /lisp/emms-player-mpd.el | |
parent | 96924d99f35234cf6de2a49574d792d5147423d4 (diff) |
Implement filtering of track data after retrieving it.
* lisp/emms.el (emms-track-info-filters): New option that allows the user
to specify some functions that filter track data. One example of this
is removing cruft like "(Album Version)" from music purchased over
Amazon without having to edit every single music file.
(emms-track-updated-functions): Update docstring to indicate that this
is called after display of the track, not before.
(emms-track-updated): Call emms-track-info-filters.
* lisp/emms-player-mpd.el (emms-player-mpd-get-tracks-1)
(emms-player-mpd-show-1): Call emms-track-info-filters.
Diffstat (limited to 'lisp/emms-player-mpd.el')
-rw-r--r-- | lisp/emms-player-mpd.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emms-player-mpd.el b/lisp/emms-player-mpd.el index 98d44d0..7efe13f 100644 --- a/lisp/emms-player-mpd.el +++ b/lisp/emms-player-mpd.el @@ -430,6 +430,7 @@ The list will be in reverse order." 'file)) (track (emms-track type file))) (emms-info-mpd track song-info) + (run-hook-with-args 'emms-track-info-filters track) (setq tracks (cons track tracks))))))) (funcall (car closure) (cdr closure) tracks))) @@ -1052,6 +1053,7 @@ positive or negative." (emms-track-set track 'type 'file)) (emms-track-set track 'name file) (emms-info-mpd track info) + (run-hook-with-args 'emms-track-info-filters track) (setq track-desc (emms-track-description track)) (when (and (stringp track-desc) (not (string= track-desc ""))) (setq desc (if desc |