add "genre" and "description" to shout config parameters
git-svn-id: https://svn.musicpd.org/mpd/trunk@2557 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
c2a2383090
commit
902cfe2523
|
@ -77,11 +77,15 @@ audio_output {
|
||||||
# host "hostname"
|
# host "hostname"
|
||||||
# port "8000"
|
# port "8000"
|
||||||
# mount "/mpd.ogg"
|
# mount "/mpd.ogg"
|
||||||
# user "source"
|
|
||||||
# password "hackme"
|
# password "hackme"
|
||||||
# quality "5.0"
|
# quality "5.0"
|
||||||
# bitrate "128"
|
# bitrate "128"
|
||||||
# format "44100:16:1"
|
# format "44100:16:1"
|
||||||
|
#
|
||||||
|
# Optional Paramters
|
||||||
|
# user "source"
|
||||||
|
# description "here's my long descriptiion"
|
||||||
|
# genre "jazz"
|
||||||
#} # end of audio_output
|
#} # end of audio_output
|
||||||
#
|
#
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
|
@ -224,6 +224,25 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
|
||||||
exit(EXIT_FAILURE);
|
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];
|
char temp[11];
|
||||||
memset(temp, 0, sizeof(temp));
|
memset(temp, 0, sizeof(temp));
|
||||||
|
|
|
@ -151,8 +151,9 @@ static int establishListen(unsigned int port, ConfigParam * param) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bind(sock,addrp,addrlen)<0) {
|
if(bind(sock,addrp,addrlen)<0) {
|
||||||
ERROR("unable to bind port %i (for address at line %i): %s\n",
|
ERROR("unable to bind port %u", port);
|
||||||
port, param->line, strerror(errno));
|
if(param) ERROR(" (for address at line %i)", param->line);
|
||||||
|
ERROR(": %s\n", strerror(errno));
|
||||||
ERROR("maybe MPD is still running?\n");
|
ERROR("maybe MPD is still running?\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue