aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb.bulk@gmail.com>2011-01-02 11:38:29 +0200
committerLucas Bonnet <lucas@rincevent.net>2011-01-03 09:42:12 +0100
commit4bb75d5f7304d1a986ff0508bce8700100908849 (patch)
tree6348cfa28e81b27235c6ad8f02213b27b00b4e72 /lisp
parent92ca880c626bb859aa082f34ba6f3fcfc7d3b0ce (diff)
* emms-source-playlist-parse-pls: add support for parsing file://-uris in pls-files
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emms-source-playlist.el8
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.