From 83234f84ad0420f121797e344dff842b35e38ed0 Mon Sep 17 00:00:00 2001 From: Dieter Deyke Date: Mon, 25 May 2009 21:05:54 -0600 Subject: Allow relative file names in .m3u playlists --- lisp/emms-source-playlist.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/emms-source-playlist.el b/lisp/emms-source-playlist.el index d2026c9..a83f8ad 100644 --- a/lisp/emms-source-playlist.el +++ b/lisp/emms-source-playlist.el @@ -263,12 +263,12 @@ the more restrictive playlist formats have already been detected and simply return non-nil always." t) -(defun emms-source-playlist-parse-m3u () +(defun emms-source-playlist-parse-m3u (directory) "Parse the m3u playlist in the current buffer." (mapcar (lambda (file) (if (string-match "\\`\\(http\\|mms\\)://" file) (emms-track 'url file) - (emms-track 'file file))) + (emms-track 'file (expand-file-name file directory)))) (emms-source-playlist-m3u-files))) (defun emms-source-playlist-m3u-files () @@ -308,7 +308,7 @@ OUT should be the buffer where tracks are stored in m3u format." (goto-char (point-min)) (when (not (emms-source-playlist-m3u-p)) (error "Not an m3u playlist file.")) - (emms-source-playlist-parse-m3u)))) + (emms-source-playlist-parse-m3u (file-name-directory file))))) ;;; pls files -- cgit v1.2.3