diff options
author | forcer <forcer> | 2006-04-01 20:43:00 +0000 |
---|---|---|
committer | forcer <mwolson@gnu.org> | 2006-04-01 20:43:00 +0000 |
commit | 215607ef80022605cad09106bb7748aa089435ce (patch) | |
tree | 46bca641038e6a1ec00b4e9f5bf4a144dfbfbd78 | |
parent | 4d0be4b900c878607600a915a0b7f371b9a557bf (diff) |
Added emms-play-playlist
darcs-hash:20060401204306-2189f-3e4d369e25d12e99382d3ab51c9e05d88c768f82.gz
-rw-r--r-- | emms-source-playlist.el | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/emms-source-playlist.el b/emms-source-playlist.el index 847b32f..233b7a0 100644 --- a/emms-source-playlist.el +++ b/emms-source-playlist.el @@ -47,6 +47,27 @@ called with two buffers: The playlist buffer and the file buffer." :type 'sexpr :group 'emms) +;;; General playlist + +(define-emms-source playlist (file) + "An EMMS source for playlists. +See `emms-source-playlist-formats' for supported formats." + (interactive (list (read-file-name "Playlist file: " + emms-source-file-default-directory + emms-source-file-default-directory + t))) + (mapc #'emms-playlist-insert-track + (with-temp-buffer + (insert-file-literally file) + (goto-char (point-min)) + (catch 'return + (let ((formats emms-source-playlist-formats)) + (while formats + (when (funcall (caar formats)) + (throw 'return (funcall (cadr (car formats))))) + (setq formats (cdr formats)))) + (error "Not a recognized playlist format"))))) + ;;; EMMS native playlists ;; Format: @@ -96,7 +117,7 @@ OUT should be a buffer to get the native EMMS format." (insert-file-literally file) (goto-char (point-min)) (when (not (emms-source-playlist-native-p)) - (error "Not a native EMMS source file.")) + (error "Not a native EMMS playlist file.")) (emms-source-playlist-parse-native)))) (defun emms-playlist-save (file) |