emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] Fix emms-browser-cache-thumbnail not actually using emms-browser


From: hiecaq
Subject: [patch] Fix emms-browser-cache-thumbnail not actually using emms-browser-thumbnail-convert-program
Date: Sun, 01 Dec 2024 22:02:12 +0800
User-agent: mu4e 1.12.7; emacs 30.0.92


Hi emms,

Currently emms-browser-cache-thumbnail checks for the existence of emms-browser-thumbnail-convert-program, but when actually performing the action it uses executable-find to search for the convert executable again. This makes a difference if the convert program I with to use is not in the PATH. The following short patch fix this.

Thanks for making and maintaining emms!

hiecaq

>From d718340e17de88f0bd7f692bb15f610676dc3c64 Mon Sep 17 00:00:00 2001
From: hiecaq <this@hiecaq.org>
Date: Sun, 1 Dec 2024 21:46:41 +0800
Subject: [PATCH] emms-browser.el: Use pre-defined convert when caching
 thumbnails

* emms-browser.el (emms-browser-cache-thumbnail): When actually
  attemptitng to call the convert program, the pre-configured and
  pre-checked emms-browser-thumbnail-convert-program should be used,
  instead of re-searching for the convert executable again.
---
 emms-browser.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emms-browser.el b/emms-browser.el
index ca42ae4..4bb2782 100644
--- a/emms-browser.el
+++ b/emms-browser.el
@@ -2165,7 +2165,7 @@ defun emms-browser-cache-thumbnail
                  ;; TODO: Add image resizing support to Emacs.
                  (setq msg (with-output-to-string
                              (with-current-buffer standard-output
-                               (setq err (call-process (executable-find 
"convert") nil '(t t) nil
+                               (setq err (call-process 
emms-browser-thumbnail-convert-program nil '(t t) nil
                                                        "-resize" (format 
"%sx%s" size-value size-value)
                                                        cover
                                                        cache-dest-file)))))
-- 
2.46.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]