aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-09 13:04:20 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-09 13:04:20 +0000
commit902cfe25231a9c2fd3459fec81a913a5ce85681d (patch)
tree91e248de3912851bdb4edf91550ff7c5ac466c54
parentc2a238309070d50498971fcddd8f437bba536263 (diff)
downloadmpd-902cfe25231a9c2fd3459fec81a913a5ce85681d.tar.gz
mpd-902cfe25231a9c2fd3459fec81a913a5ce85681d.tar.xz
mpd-902cfe25231a9c2fd3459fec81a913a5ce85681d.zip
add "genre" and "description" to shout config parameters
git-svn-id: https://svn.musicpd.org/mpd/trunk@2557 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--doc/mpdconf.example6
-rw-r--r--src/audioOutputs/audioOutput_shout.c19
-rw-r--r--src/listen.c5
3 files changed, 27 insertions, 3 deletions
diff --git a/doc/mpdconf.example b/doc/mpdconf.example
index 139ebe29f..7c9cdab86 100644
--- a/doc/mpdconf.example
+++ b/doc/mpdconf.example
@@ -77,11 +77,15 @@ audio_output {
# host "hostname"
# port "8000"
# mount "/mpd.ogg"
-# user "source"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
+#
+# Optional Paramters
+# user "source"
+# description "here's my long descriptiion"
+# genre "jazz"
#} # end of audio_output
#
##########################################################
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index 2c0cdd898..8eb4f4672 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -224,6 +224,25 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
exit(EXIT_FAILURE);
}
+ /* optional paramters */
+ blockParam = getBlockParam(param, "genre");
+ if(blockParam && shout_set_genre(sd->shoutConn, blockParam->value)) {
+ ERROR("error configuring shout defined at line %i: %s\n",
+ param->line,
+ shout_get_error(sd->shoutConn));
+ exit(EXIT_FAILURE);
+ }
+
+ blockParam = getBlockParam(param, "description");
+ if(blockParam && shout_set_description(sd->shoutConn,
+ blockParam->value))
+ {
+ ERROR("error configuring shout defined at line %i: %s\n",
+ param->line,
+ shout_get_error(sd->shoutConn));
+ exit(EXIT_FAILURE);
+ }
+
{
char temp[11];
memset(temp, 0, sizeof(temp));
diff --git a/src/listen.c b/src/listen.c
index 7446f2e91..9d33698a0 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -151,8 +151,9 @@ static int establishListen(unsigned int port, ConfigParam * param) {
}
if(bind(sock,addrp,addrlen)<0) {
- ERROR("unable to bind port %i (for address at line %i): %s\n",
- port, param->line, strerror(errno));
+ ERROR("unable to bind port %u", port);
+ if(param) ERROR(" (for address at line %i)", param->line);
+ ERROR(": %s\n", strerror(errno));
ERROR("maybe MPD is still running?\n");
exit(EXIT_FAILURE);
}