From 2d70d0a638b8b1f790674ef7e31efb44ca671b0d Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 9 Apr 2006 00:35:00 +0000 Subject: emms-source-playlist: Get things working to my satisfaction, like saving playlists in different formats and (optionally) being prompted for which format. darcs-hash:20060409003540-1bfb2-4aedadb4bc109afb1aaf6b96530e61d6a9f19201.gz --- emms-player-mpd.el | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'emms-player-mpd.el') diff --git a/emms-player-mpd.el b/emms-player-mpd.el index 5dac00a..821b8ab 100644 --- a/emms-player-mpd.el +++ b/emms-player-mpd.el @@ -523,16 +523,14 @@ This handles both m3u and pls type playlists." (with-temp-buffer (insert-file-contents playlist) (goto-char (point-min)) - (let ((list (cond ((emms-source-playlist-m3u-p) - (emms-source-playlist-parse-m3u-1)) - ((emms-source-playlist-pls-p) - (emms-source-playlist-parse-pls-1)) - (t nil))) - (any-success nil)) - (dolist (file list) - (when (emms-player-mpd-add-file file) - (setq any-success t))) - any-success))) + (let ((format (emms-source-playlist-determine-format))) + (when format + (let ((list (emms-source-playlist-files format)) + (any-success nil)) + (dolist (file list) + (when (emms-player-mpd-add-file file) + (setq any-success t))) + any-success))))) (defun emms-player-mpd-add (track) "Add TRACK to the MusicPD playlist." -- cgit v1.2.3