aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2021-11-25 19:13:00 +1100
committerYuchen Pei <hi@ypei.me>2021-11-25 19:13:00 +1100
commit65a598f45728c3d457a08cc2c9359b6a08b1d049 (patch)
tree44bdf6bab7725ccc6b96a65d50ebc0d1c27fdb99
parent8eccce9917a5f0d7f61de154c7ef9e5d48d2290a (diff)
adding thumbnail display
-rw-r--r--emms-playlist-mode.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el
index f4de0dc..48bad44 100644
--- a/emms-playlist-mode.el
+++ b/emms-playlist-mode.el
@@ -470,9 +470,15 @@ This preserves the current EMMS buffer."
When NO-NEWLINE is non-nil, do not insert a newline after the track."
(emms-playlist-ensure-playlist-buffer)
(emms-with-inhibit-read-only-t
- (insert (emms-propertize (emms-track-force-description track)
- 'emms-track track
- 'face 'emms-playlist-track-face))
+ (if (emms-track-get track 'thumbnail)
+ (insert (emms-propertize
+ (emms-track-force-description track)
+ 'emms-track track
+ 'face 'emms-playlist-track-face
+ 'display (create-image (emms-track-get track 'thumbnail))))
+ (insert (emms-propertize (emms-track-force-description track)
+ 'emms-track track
+ 'face 'emms-playlist-track-face)))
(when (emms-playlist-selected-track-at-p)
(emms-playlist-mode-overlay-selected))
(if no-newline