Dieter Deyke
2017-11-27 09:20:39 UTC
Hi,
I made the following change to my copy of emms in order to be able to
play/add playlists from dired in emms-dired-mode:
diff --git a/lisp/emms-source-file.el b/lisp/emms-source-file.el
index 04faf9c..e34609e 100644
--- a/lisp/emms-source-file.el
+++ b/lisp/emms-source-file.el
@@ -106,10 +106,12 @@ user."
emms-source-file-default-directory
t
(thing-at-point 'filename))))
- (if (file-directory-p file)
- (emms-source-directory file)
- (emms-playlist-insert-track
- (emms-track 'file (expand-file-name file)))))
+ (if (member (downcase (file-name-extension file)) '("m3u" "m3u8" "pls"))
+ (emms-source-playlist file)
+ (if (file-directory-p file)
+ (emms-source-directory file)
+ (emms-playlist-insert-track
+ (emms-track 'file (expand-file-name file))))))
;;;###autoload (autoload 'emms-play-directory "emms-source-file" nil t)
;;;###autoload (autoload 'emms-add-directory "emms-source-file" nil t)
If this is any good it could be added to the master repo.
Thanks,
I made the following change to my copy of emms in order to be able to
play/add playlists from dired in emms-dired-mode:
diff --git a/lisp/emms-source-file.el b/lisp/emms-source-file.el
index 04faf9c..e34609e 100644
--- a/lisp/emms-source-file.el
+++ b/lisp/emms-source-file.el
@@ -106,10 +106,12 @@ user."
emms-source-file-default-directory
t
(thing-at-point 'filename))))
- (if (file-directory-p file)
- (emms-source-directory file)
- (emms-playlist-insert-track
- (emms-track 'file (expand-file-name file)))))
+ (if (member (downcase (file-name-extension file)) '("m3u" "m3u8" "pls"))
+ (emms-source-playlist file)
+ (if (file-directory-p file)
+ (emms-source-directory file)
+ (emms-playlist-insert-track
+ (emms-track 'file (expand-file-name file))))))
;;;###autoload (autoload 'emms-play-directory "emms-source-file" nil t)
;;;###autoload (autoload 'emms-add-directory "emms-source-file" nil t)
If this is any good it could be added to the master repo.
Thanks,
--
Dieter Deyke
mailto:***@gmail.com
Get my Gnupg key:
gpg --keyserver keys.gnupg.net --recv-keys B116EA20
Dieter Deyke
mailto:***@gmail.com
Get my Gnupg key:
gpg --keyserver keys.gnupg.net --recv-keys B116EA20