emms-help
[Top][All Lists]
Advanced

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

[emms-help] [PATCH] * emms-source-playlist-parse-pls: add support for pa


From: Dirk-Jan C . Binnema
Subject: [emms-help] [PATCH] * emms-source-playlist-parse-pls: add support for parsing file://-uris in pls-files
Date: Sun, 02 Jan 2011 11:38:29 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO)

---
 lisp/emms-source-playlist.el |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/emms-source-playlist.el b/lisp/emms-source-playlist.el
index b7677ec..0bcc548 100644
--- a/lisp/emms-source-playlist.el
+++ b/lisp/emms-source-playlist.el
@@ -342,8 +342,12 @@ they have absolute paths."
     (mapcar (lambda (file)
               (if (string-match "\\`\\(http\\|mms\\)://" file)
                   (emms-track 'url file)
-                (emms-track 'file (expand-file-name file dir))))
-            (emms-source-playlist-pls-files))))
+               (if (string-match "\\`file://" file) ;; handle file:// uris 
+                 (let ((file (url-unhex-string (substring file 7))))
+                   (emms-track 'file file))
+                 (emms-track 'file (expand-file-name file dir)))))
+      (emms-source-playlist-pls-files))))
+
 
 (defun emms-source-playlist-pls-files ()
   "Extract a list of filenames from the given pls playlist.
-- 
1.7.1




reply via email to

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