emms-help
[Top][All Lists]
Advanced

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

[emms-help] emms-browser covers and scrolling


From: Lucas Bonnet
Subject: [emms-help] emms-browser covers and scrolling
Date: Fri, 30 Jun 2006 17:05:29 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.51 (gnu/linux)

Hello!

Since resolve (AKA Damien E.) added covers support to the browser, I
played with it and started enjoying it. If your covers, like mine, have
various names and sizes, here's a command to run to get them to a
standard size:

find /path/to/music/ -iname "*.jpg" -exec convert -resize 100x100 "{}" 
"{}-emms.jpg" \;

Now define a custom function :

(defun my-emms-browser-covers (path size)
"Ugly and not lispish, but works."
  (let* ((files  (directory-files (file-name-directory path)))
         (covr   (catch :found
                   (dolist (item files)
                     (if (string-match "-emms.jpg$" item)
                         (throw :found item))))))
    (if covr
        (concat (file-name-directory path) covr))))

(setq emms-browser-covers 'my-emms-browser-covers)


With this you'll have the first filename matching -emms.jpg in every
folder where a cover is. If you have several cover files in a folder,
just keep only one ending in -emms.jpg. This way, you'll have all your
covers in their original size, plus a thumbnail suitable for
emms-browser.

If you, like resolve and I, experience weird scrolling with images in a
buffer, try:

(setq scroll-down-aggressively 0.0
      scroll-up-aggressively 0.0)

It should fix it.

Happy hacking,
-- 
Lucas





reply via email to

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