[Top][All Lists]

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

Re: [emms-help] Dynamic cover thumbnail caching

From: Pierre Neidhardt
Subject: Re: [emms-help] Dynamic cover thumbnail caching
Date: Tue, 24 Oct 2017 21:32:03 +0100
User-agent: mu4e 0.9.18; emacs 25.2.1

I forgot to report an issue I have with the current cover code:

To hook my caching code into the current process, I have to set

        (setq emms-browser-covers (function emms-cache-covers))

The above won't work because `emms-browser--build-cover-filename'
expects a list:

        (defun emms-browser--build-cover-filename ()
          "Build `emms-browser--covers-filename'.
        Based on from `emms-browser-covers' and
          (setq emms-browser--covers-filename
                (mapcar (lambda (cover)
                          (if (file-name-extension cover)
                              (list cover)
                            (mapcar (lambda (ext) (concat cover "." ext))

One possible patch: Store the function with fset and modify
`emms-browser-get-cover-from-path' accordingly:

        (fset 'emms-browser-covers 'emms-cache-covers)

        (defun emms-browser-get-cover-from-path (path &optional size)
        -         ((functionp emms-browser-covers)
        -          (funcall emms-browser-covers (file-name-directory path) 
        +         ((functionp 'emms-browser-covers)
        +          (emms-browser-covers (file-name-directory path) size))

Pierre Neidhardt

The wages of sin are unreported.

reply via email to

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