From: Mark Oteiza <mvoteiza@udel.edu>
To: emacs-devel@gnu.org
Subject: [PATCH] Search for more cover image names in MPC
Date: Sun, 11 Oct 2015 11:18:02 -0400 [thread overview]
Message-ID: <871td14eol.fsf@udel.edu> (raw)
* lisp/mpc.el (mpc-format): Also look for .folder.jpg or folder.jpg
case insensitively
---
The downcase isn't necessary, I just thought it would be nice to allow
things cased differently. At least in my library, I seem to have a
handful of capitalized folder images.
lisp/mpc.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/mpc.el b/lisp/mpc.el
index bc7d473..0178712 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -44,7 +44,6 @@
;; - visual feedback for drag'n'drop
;; - display/set `repeat' and `random' state (and maybe also `crossfade').
;; - allow multiple *mpc* sessions in the same Emacs to control different mpds.
-;; - look for .folder.png (freedesktop) or folder.jpg (XP) as well.
;; - fetch album covers and lyrics from the web?
;; - improve MPC-Status: better volume control, add a way to show/hide the
;; rest, plus add the buttons currently in the toolbar.
@@ -1010,7 +1009,11 @@ If PLAYLIST is t or nil or missing, use the main playlist."
time)))))
(`Cover
(let* ((dir (file-name-directory (cdr (assq 'file info))))
- (cover (concat dir "cover.jpg"))
+ (covers '(".folder.png" "cover.jpg" "folder.jpg"))
+ (cover (cl-flet ((coverp (fn)
+ (member (downcase fn) covers)))
+ (cl-loop for file in (directory-files dir)
+ if (coverp file) return file)))
(file (with-demoted-errors "MPC: %s"
(mpc-file-local-copy cover)))
image)
--
2.6.1
reply other threads:[~2015-10-11 15:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871td14eol.fsf@udel.edu \
--to=mvoteiza@udel.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.