From abf91c38a4422821c03c56f295e1a865ed13812d Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sat, 5 Apr 2014 13:53:03 +0100 Subject: [PATCH] start working on changing playlists for now, just simple numeric favourites, through a bit of a sucky interface. Baby steps... --- squeeze.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/squeeze.el b/squeeze.el index 2b0e4b8..c343094 100644 --- a/squeeze.el +++ b/squeeze.el @@ -24,6 +24,7 @@ (defvar squeeze-control-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "SPC") 'squeeze-control-toggle-power) + (define-key map (kbd "f") 'squeeze-control-play-favorite) (define-key map (kbd "g") 'squeeze-control-refresh) (define-key map (kbd "+") 'squeeze-control-volume-up) (define-key map (kbd "-") 'squeeze-control-volume-down) @@ -179,6 +180,13 @@ (setq id (get-text-property (point) 'squeeze-playerid))) (comint-send-string (get-buffer-process "*squeeze*") (format "%s power\n" id))) +(defun squeeze-control-play-favorite (&optional favorite id) + (interactive "nFavourite: ") + (unless id + (setq id (get-text-property (point) 'squeeze-playerid))) + (comint-send-string (get-buffer-process "*squeeze*") + (format "%s favorites playlist play item_id:%d\n" id favorite))) + (defun squeeze-control-query-power (&optional id) (interactive) (unless id -- 2.39.5