From a32df57496361ffd72c68e1e135439d0ec6ec87f Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 6 Jan 2025 23:04:35 +1100 Subject: [emacs] Start emms scoring When a track finishes, score up by 1. When a track is manually chosen, set the score delta to 2. Added a function my-emms-wrapped that prints the top 5 scored tracks. --- emacs/.emacs.d/init/ycp-emms.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'emacs/.emacs.d/init') diff --git a/emacs/.emacs.d/init/ycp-emms.el b/emacs/.emacs.d/init/ycp-emms.el index a3a4604..458a6b0 100644 --- a/emacs/.emacs.d/init/ycp-emms.el +++ b/emacs/.emacs.d/init/ycp-emms.el @@ -90,6 +90,8 @@ (my-override emms-mode-line-toggle) (add-hook 'emms-playlist-selection-changed-hook 'my-emms-output-current-track-to-i3bar-file) + (add-hook 'emms-player-finished-hook 'my-emms-score-up-playing) + (add-hook 'emms-player-started-hook 'my-emms-score-up-chosen-bonus) (setq emms-player-next-function 'my-emms-next-track-or-random-album) (setq emms-players-preference-f 'my-emms-players-preference) (my-keybind dired-mode-map "e" #'my-dired-add-to-emms) -- cgit v1.2.3