[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/09: services: mpd: Fix unintentional API breakage for mixer-type fiel
From: |
guix-commits |
Subject: |
07/09: services: mpd: Fix unintentional API breakage for mixer-type field. |
Date: |
Sun, 2 Apr 2023 06:40:22 -0400 (EDT) |
lilyp pushed a commit to branch master
in repository guix.
commit 2c4df1a41af70ebbae4422878ce6a4c8600c6811
Author: Bruno Victal <mirai@makinata.eu>
AuthorDate: Sun Mar 26 19:41:31 2023 +0100
services: mpd: Fix unintentional API breakage for mixer-type field.
* gnu/services/audio.scm (mpd-output)[mixer-type]: Use sanitizer to
accept both strings and symbols as values.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
gnu/services/audio.scm | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm
index c073b85a32..bc4aed71dc 100644
--- a/gnu/services/audio.scm
+++ b/gnu/services/audio.scm
@@ -140,6 +140,11 @@
(define list-of-symbol?
(list-of symbol?))
+
+;;;
+;;; MPD
+;;;
+
(define (mpd-serialize-field field-name value)
(let ((field (if (string? field-name) field-name
(uglify-field-name field-name)))
@@ -294,7 +299,17 @@ disconnect all listeners even when playback is
accidentally stopped.")
for this audio output: the @code{hardware} mixer, the @code{software}
mixer, the @code{null} mixer (allows setting the volume, but with no
effect; this can be used as a trick to implement an external mixer
-External Mixer) or no mixer (@code{none}).")
+External Mixer) or no mixer (@code{none})."
+ (sanitizer
+ (lambda (x) ; TODO: deprecated, remove me later.
+ (cond
+ ((symbol? x)
+ (warning (G_ "symbol value for 'mixer-type' is deprecated, \
+use string instead~%"))
+ (symbol->string x))
+ ((string? x) x)
+ (else
+ (configuration-field-error #f 'mixer-type x))))))
(replay-gain-handler
maybe-string
- branch master updated (f0c8cb44a4 -> 380faf265b), guix-commits, 2023/04/02
- 02/09: gnu: python-imageio: Update to 2.26.0., guix-commits, 2023/04/02
- 04/09: gnu: Add python-clingraph., guix-commits, 2023/04/02
- 03/09: gnu: Separate potassco packages into their own module., guix-commits, 2023/04/02
- 07/09: services: mpd: Fix unintentional API breakage for mixer-type field.,
guix-commits <=
- 05/09: services: configuration: Add user-defined sanitizer support., guix-commits, 2023/04/02
- 08/09: services: mpd: Use proper records for user and group fields., guix-commits, 2023/04/02
- 01/09: gnu: Add python-imageio-ffmpeg., guix-commits, 2023/04/02
- 06/09: services: replace bare serializers with (serializer ...), guix-commits, 2023/04/02
- 09/09: services: mympd: Use records for user and group fields., guix-commits, 2023/04/02