summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/media/jao-mpc.el4
-rw-r--r--lib/media/jao-random-album.el12
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/media/jao-mpc.el b/lib/media/jao-mpc.el
index 9cdd5bd..74f9b5b 100644
--- a/lib/media/jao-mpc.el
+++ b/lib/media/jao-mpc.el
@@ -116,7 +116,7 @@
(let ((status (or (jao-mpc-status port) "")))
(setq jao-mpc-minibuffer-str
(if (string= "playing" status) (jao-mpc--current-str port) ""))
- (when (and jao-random-album-p
+ (when (and jao-random-album-active
(string= status "paused")
(string= "0\n" (jao-mpc--cmd "status %songpos%" port)))
(jao-random-album-next)))
@@ -301,7 +301,7 @@
#'jao-mpc--add-and-play
#'jao-mpc-stop
jao-notify-audio-icon)
- (jao-mpc-connect)
+ (let ((jao-random-album-active nil)) (jao-mpc-connect))
(when secondary-port (jao-mpc-connect secondary-port))
(when priority
(if (> priority 0)
diff --git a/lib/media/jao-random-album.el b/lib/media/jao-random-album.el
index 2800115..4fc06cb 100644
--- a/lib/media/jao-random-album.el
+++ b/lib/media/jao-random-album.el
@@ -1,6 +1,6 @@
;; jao-random-album.el -- play random albums
-;; Copyright (C) 2009, 2010, 2017, 2018, 2019, 2021 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2017, 2018, 2019, 2021, 2022 Jose Antonio Ortega Ruiz
;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
;; Start date: Sat Jul 04, 2009 13:06
@@ -20,7 +20,7 @@
(require 'jao-notify)
-(defvar jao-random-album-p t)
+(defvar jao-random-album-active t)
(defvar jao-random-lines nil)
(defvar jao-random-lines-file (expand-file-name "~/.emacs.d/random-lines"))
(defvar jao-random-album-notify-p t)
@@ -60,19 +60,19 @@
(defun jao-random-album-start ()
(interactive)
- (setq jao-random-album-p t)
+ (setq jao-random-album-active t)
(jao-random-album-next))
(defun jao-random-album-stop ()
(interactive)
- (setq jao-random-album-p nil)
+ (setq jao-random-album-active nil)
(funcall jao-random-album-stop))
(defun jao-random-album-toggle ()
(interactive)
- (setq jao-random-album-p (not jao-random-album-p))
+ (setq jao-random-album-active (not jao-random-album-active))
(message "Random album %s"
- (if jao-random-album-p "enabled" "disabled")))
+ (if jao-random-album-active "enabled" "disabled")))
(defun jao-random-album-next ()
(interactive)