[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emms-help] EMMS and MusicPD
From: |
David Engster |
Subject: |
[emms-help] EMMS and MusicPD |
Date: |
Thu, 18 Feb 2010 17:10:16 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.92 (gnu/linux) |
I recently switched to EMMS and so far I'm pretty happy with it. Thanks
a lot to all involved with this nice package!
I primarily want to use EMMS as a mpd-client, using emms-player-mpd. I'd
also like to let mpd do the extraction of the metadata, with EMMS always
using the information it gets from mpd. Currently, when I
add/modify/delete files, I call emms-player-mpd-update-all and then
emms-cache-set-from-mpd-all. This is working, but the latter function
does not clear the cache beforehand, which is often problematic when I
changed or removed files. Also, I don't want to call two functions after
every change, but I cannot just put them in one function since
'e-p-m-update-all' is running asynchronously.
So I wrote some stuff to do this and attached it to this mail. Maybe
this can be integrated into emms-player-mpd.el? I think it would be
useful for other, too.
I also attached another small patch regarding the syncing of the EMMS
and mpd playlist. The problem here is that I sometimes have playlists
with music and video files, and EMMS tries to insert the video files
into the mpd playlist, which of course causes an error. My patch adds a
check before adding files to the mpd playlist.
Regards,
David
emms-mpd-update.el
Description: application/emacs-lisp
diff --git a/lisp/emms-player-mpd.el b/lisp/emms-player-mpd.el
index fa8f911..e44bac9 100644
--- a/lisp/emms-player-mpd.el
+++ b/lisp/emms-player-mpd.el
@@ -805,7 +805,8 @@ Execute CALLBACK with CLOSURE as its first argument when
done."
((or (eq type 'playlist)
(string-match "\\.\\(m3u\\|pls\\)\\'" name))
(emms-player-mpd-add-playlist name closure callback))
- ((eq type 'file)
+ ((and (eq type 'file)
+ (string-match emms-player-mpd-supported-regexp name))
(emms-player-mpd-add-file name closure callback)))))
(defun emms-player-mpd-add-several-tracks (tracks closure callback)
- [emms-help] EMMS and MusicPD,
David Engster <=