2 Jan 2011 10:38
[PATCH] * emms-source-playlist-parse-pls: add support for parsing file://-uris in pls-files
Dirk-Jan C. Binnema <djcb.bulk <at> gmail.com>
2011-01-02 09:38:29 GMT
2011-01-02 09:38:29 GMT
---
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
<at> <at> -342,8 +342,12 <at> <at> 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
RSS Feed