[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 453af81: * lisp/mpc.el (mpc-format): Always push fo
From: |
Mark Oteiza |
Subject: |
[Emacs-diffs] master 453af81: * lisp/mpc.el (mpc-format): Always push form to pred |
Date: |
Wed, 14 Oct 2015 23:01:46 +0000 |
branch: master
commit 453af81f16a7eca0bc246c9278d19ba995641dfa
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>
* lisp/mpc.el (mpc-format): Always push form to pred
---
lisp/mpc.el | 48 ++++++++++++++++++++++++------------------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/lisp/mpc.el b/lisp/mpc.el
index f83b478..55123ef 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1010,30 +1010,30 @@ If PLAYLIST is t or nil or missing, use the main
playlist."
(substring time (match-end 0))
time)))))
(`Cover
- (if-let ((dir (file-name-directory
- (mpc-file-local-copy (cdr (assq 'file
info)))))
- (covers '(".folder.png" "cover.jpg"
"folder.jpg"))
- (cover (cl-loop for file in (directory-files dir)
- if (member (downcase file)
covers)
- return (concat dir file)))
- (file (with-demoted-errors "MPC: %s"
- (mpc-file-local-copy cover))))
- (let (image)
- ;; (debug)
- (push `(equal ',dir (file-name-directory (cdr (assq
'file info)))) pred)
- (if (null size) (setq image (create-image file))
- (let ((tempfile (make-temp-file "mpc" nil
".jpg")))
- (call-process "convert" nil nil nil
- "-scale" size file tempfile)
- (setq image (create-image tempfile))
- (mpc-tempfiles-add image tempfile)))
- (setq size nil)
- (propertize dir 'display image))
- ;; Make sure we return something on which we can
- ;; place the `mpc-pred' property, as
- ;; a negative-cache. We could also use
- ;; a default cover.
- (progn (setq size nil) " ")))
+ (let ((dir (file-name-directory
+ (mpc-file-local-copy (cdr (assq 'file
info))))))
+ ;; (debug)
+ (push `(equal ',dir (file-name-directory (cdr (assq
'file info)))) pred)
+ (if-let ((covers '(".folder.png" "cover.jpg"
"folder.jpg"))
+ (cover (cl-loop for file in (directory-files
dir)
+ if (member (downcase file)
covers)
+ return (concat dir file)))
+ (file (with-demoted-errors "MPC: %s"
+ (mpc-file-local-copy cover))))
+ (let (image)
+ (if (null size) (setq image (create-image file))
+ (let ((tempfile (make-temp-file "mpc" nil
".jpg")))
+ (call-process "convert" nil nil nil
+ "-scale" size file tempfile)
+ (setq image (create-image tempfile))
+ (mpc-tempfiles-add image tempfile)))
+ (setq size nil)
+ (propertize dir 'display image))
+ ;; Make sure we return something on which we can
+ ;; place the `mpc-pred' property, as
+ ;; a negative-cache. We could also use
+ ;; a default cover.
+ (progn (setq size nil) " "))))
(_ (let ((val (cdr (assq tag info))))
;; For Streaming URLs, there's no other info
;; than the URL in `file'. Pretend it's in `Title'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 453af81: * lisp/mpc.el (mpc-format): Always push form to pred,
Mark Oteiza <=