diff options
| author | Mark Oteiza | 2015-10-12 16:28:33 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2015-10-12 16:31:52 -0400 |
| commit | 0f4efd12209607b54371868141064c12b7f021e9 (patch) | |
| tree | f53a0e90d7b59d2ef53680f56d84c75df5b458e9 /lisp | |
| parent | 4462823ebfaeda6540dac3cacf03592406bedc05 (diff) | |
| download | emacs-0f4efd12209607b54371868141064c12b7f021e9.tar.gz emacs-0f4efd12209607b54371868141064c12b7f021e9.zip | |
Search for more cover image names in MPC
* lisp/mpc.el (mpc-format): Also look for .folder.jpg or folder.jpg
case insensitively
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mpc.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mpc.el b/lisp/mpc.el index bc7d4733ee8..6e69b6fa9d0 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -44,7 +44,6 @@ | |||
| 44 | ;; - visual feedback for drag'n'drop | 44 | ;; - visual feedback for drag'n'drop |
| 45 | ;; - display/set `repeat' and `random' state (and maybe also `crossfade'). | 45 | ;; - display/set `repeat' and `random' state (and maybe also `crossfade'). |
| 46 | ;; - allow multiple *mpc* sessions in the same Emacs to control different mpds. | 46 | ;; - allow multiple *mpc* sessions in the same Emacs to control different mpds. |
| 47 | ;; - look for .folder.png (freedesktop) or folder.jpg (XP) as well. | ||
| 48 | ;; - fetch album covers and lyrics from the web? | 47 | ;; - fetch album covers and lyrics from the web? |
| 49 | ;; - improve MPC-Status: better volume control, add a way to show/hide the | 48 | ;; - improve MPC-Status: better volume control, add a way to show/hide the |
| 50 | ;; rest, plus add the buttons currently in the toolbar. | 49 | ;; rest, plus add the buttons currently in the toolbar. |
| @@ -1009,8 +1008,12 @@ If PLAYLIST is t or nil or missing, use the main playlist." | |||
| 1009 | (substring time (match-end 0)) | 1008 | (substring time (match-end 0)) |
| 1010 | time))))) | 1009 | time))))) |
| 1011 | (`Cover | 1010 | (`Cover |
| 1012 | (let* ((dir (file-name-directory (cdr (assq 'file info)))) | 1011 | (let* ((dir (file-name-directory |
| 1013 | (cover (concat dir "cover.jpg")) | 1012 | (mpc-file-local-copy (cdr (assq 'file info))))) |
| 1013 | (covers '(".folder.png" "cover.jpg" "folder.jpg")) | ||
| 1014 | (cover (cl-loop for file in (directory-files dir) | ||
| 1015 | if (member (downcase file) covers) | ||
| 1016 | return (concat dir file))) | ||
| 1014 | (file (with-demoted-errors "MPC: %s" | 1017 | (file (with-demoted-errors "MPC: %s" |
| 1015 | (mpc-file-local-copy cover))) | 1018 | (mpc-file-local-copy cover))) |
| 1016 | image) | 1019 | image) |