Created
October 19, 2015 20:28
-
-
Save death/bf4af64d7c3cfcf94fb3 to your computer and use it in GitHub Desktop.
helm-mingus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debugger entered--Lisp error: (wrong-type-argument stringp (file "blues/Peter Green/1979 - In The Skies/03-A Fool No More.mp3" Last-Modified "2014-01-15T23:23:29Z" Time 467 Artist "Peter Green" Title "A Fool No More" Album "In The Skies" Track "03" Date "1998" Genre "Blues")) | |
string-match("[[*?]" (file "blues/Peter Green/1979 - In The Skies/03-A Fool No More.mp3" Last-Modified "2014-01-15T23:23:29Z" Time 467 Artist "Peter Green" Title "A Fool No More" Album "In The Skies" Track "03" Date "1998" Genre "Blues") nil) | |
helm--compute-marked((file "blues/Peter Green/1979 - In The Skies/03-A Fool No More.mp3" Last-Modified "2014-01-15T23:23:29Z" Time 467 Artist "Peter Green" Title "A Fool No More" Album "In The Skies" Track "03" Date "1998" Genre "Blues") ((match helm-mm-exact-match helm-mm-match) (name . "All songs") (candidates . helm-mingus-all-candidates) (action ("Queue" . helm-mingus-queue-song))) t) | |
helm-marked-candidates(:with-wildcard t) | |
(mapconcat (function (lambda (song) (let ((file (getf song (quote file)))) (format "add %s" (mpd-safe-string file))))) (helm-marked-candidates :with-wildcard t) "\n") | |
(let ((commands (mapconcat (function (lambda (song) (let (...) (format "add %s" ...)))) (helm-marked-candidates :with-wildcard t) "\n")) (buffer (get-buffer "*Mingus*"))) (mpd-execute-command mpd-inter-conn commands) (if buffer (progn (save-current-buffer (set-buffer buffer) (mingus-refresh))))) | |
helm-mingus-queue-song((file "blues/Peter Green/1979 - In The Skies/03-A Fool No More.mp3" Last-Modified "2014-01-15T23:23:29Z" Time 467 Artist "Peter Green" Title "A Fool No More" Album "In The Skies" Track "03" Date "1998" Genre "Blues")) | |
helm-execute-selection-action-1() | |
helm-execute-selection-action() | |
#[0 "\311\211\211\211\305\206\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Play songs from mingus playlist | |
(defun helm-mingus-play-song (song) | |
(mingus-play (getf song 'Pos))) | |
(defun helm-mingus-playlist-candidates () | |
(mapcar (lambda (song) | |
(cons (mingus-make-song-string song | |
mingus-mode-line-format-to-use | |
mingus-playlist-separator) | |
song)) | |
(mingus-get-songs "playlistinfo"))) | |
(defvar helm-source-mingus-playlist | |
'((name . "Playlist") | |
(candidates . helm-mingus-playlist-candidates) | |
(action . (("Play" . helm-mingus-play-song))))) | |
(defun helm-mingus-playlist () | |
(interactive) | |
(helm :sources '(helm-source-mingus-playlist) | |
:buffer "*helm-mingus-playlist*")) | |
;; Queue songs from mingus database | |
(defun helm-mingus-queue-song (_ignore) | |
(let ((commands (mapconcat (lambda (song) | |
(let ((file (getf song 'file))) | |
(format "add %s" (mpd-safe-string file)))) | |
(helm-marked-candidates :with-wildcard t) | |
"\n")) | |
(buffer (get-buffer "*Mingus*"))) | |
(mpd-execute-command mpd-inter-conn commands) | |
(when buffer | |
(with-current-buffer buffer | |
(mingus-refresh))))) | |
(defvar helm-mingus-all-candidates-cache nil) | |
(defvar helm-mingus-all-candidates-cache-time nil) | |
(defun helm-mingus-all-candidates () | |
(when (or (null helm-mingus-all-candidates-cache-time) | |
(> (- (float-time) helm-mingus-all-candidates-cache-time) | |
(* 6 60 60))) | |
(setq helm-mingus-all-candidates-cache | |
(mapcar (lambda (song) | |
(cons (mingus-make-song-string song | |
mingus-mode-line-format-to-use | |
mingus-playlist-separator) | |
song)) | |
(mingus-get-songs-with-smart-cache "listallinfo"))) | |
(setq helm-mingus-all-candidates-cache-time (float-time))) | |
helm-mingus-all-candidates-cache) | |
(defvar helm-source-mingus-all | |
'((name . "All songs") | |
(candidates . helm-mingus-all-candidates) | |
(action . (("Queue" . helm-mingus-queue-song))))) | |
(defun helm-mingus-all (&optional arg) | |
(interactive "P") | |
(when arg | |
(setq helm-mingus-all-candidates-cache-time nil)) | |
(helm :sources '(helm-source-mingus-all) | |
:buffer "*helm-mingus-all*")) | |
(provide 'helm-mingus) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment