From 859fe8dd6b7d0a525fc15d31a84844ff36da1cb6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 22 Jun 2006 11:14:00 +0000 Subject: browser: uniquify track names, mpg321-remote: restart dead process darcs-hash:20060622111421-4e3e3-d843dafdb0245f9e08c032ad43bed6b2dc10c701.gz --- emms-browser.el | 4 ++++ emms-player-mpg321-remote.el | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/emms-browser.el b/emms-browser.el index 9b7c9db..9c9ca31 100644 --- a/emms-browser.el +++ b/emms-browser.el @@ -484,6 +484,10 @@ Items with no metadata for TYPE will be placed in 'misc'" (let (db key existing) (dolist (track tracks) (setq key (emms-track-get track type "misc")) + (when (eq type 'info-title) + ;; try and make every track unique + (setq key (concat (emms-browser-track-number track) + key))) (setq existing (assoc key db)) (if existing (setcdr existing (cons track (cdr existing))) diff --git a/emms-player-mpg321-remote.el b/emms-player-mpg321-remote.el index 52453b7..be5f63f 100644 --- a/emms-player-mpg321-remote.el +++ b/emms-player-mpg321-remote.el @@ -127,13 +127,17 @@ For example: (list \"-o\" \"alsa\")" "Sentinel for determining the end of process" (when (or (eq (process-status proc) 'exit) (eq (process-status proc) 'signal)) - (emms-player-stopped))) + ;; reset + (setq emms-player-mpg321-remote-ignore-stop 0) + (message "Remote process died!"))) (defun emms-player-mpg321-remote-send (text) "Send TEXT to the mpg321 remote process, and add a newline." - (let ((proc (emms-player-mpg321-remote-process))) + (let (proc) ;; we shouldn't be trying to send to a dead process - (assert proc) + (unless (emms-player-mpg321-remote-running-p) + (emms-player-mpg321-remote-start-process)) + (setq proc (emms-player-mpg321-remote-process)) (process-send-string proc (concat text "\n")))) ;; -------------------------------------------------- -- cgit v1.2.3