aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDieter Deyke <deyke@yahoo.com>2009-05-25 21:05:54 -0600
committerMichael Olson <mwolson@gnu.org>2009-06-08 05:00:31 -0700
commit83234f84ad0420f121797e344dff842b35e38ed0 (patch)
tree52c091194449b727a0c83924f5e585fdb1cbce7c /lisp
parentf4dd5b038324bfef2da338eea70ea32e9947e0e2 (diff)
Allow relative file names in .m3u playlists
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emms-source-playlist.el6
1 files changed, 3 insertions, 3 deletions
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