emms-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emms-patches] [COMMIT] Allow relative file names in .m3u playlists


From: Dieter Deyke
Subject: [Emms-patches] [COMMIT] Allow relative file names in .m3u playlists
Date: Mon, 25 May 2009 21:05:54 -0600

---
 lisp/emms-source-playlist.el |    6 +++---
 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
 
-- 
debian.1.5.6.1.19.ge6b2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]