Re: Adding Configuration Options

Karl Heyes <[email protected]>
Newsgroups gmane.comp.audio.icecast.devel
Message-ID <[email protected]>
On 06/09/10 16:42, Nicholas Young wrote:
> So, I'm in the middle of understanding how the icecast.xml file is parsed,
> and how the settings for a specific mount point are read.
>
> In cfgfile.c - _parse_mount() I've added the following lines:
>
> } else if (xmlStrcmp (node->name, XMLSTR("playlist-notify-uri")) == 0) {
> mount->playlist_notify_uri = (char *)xmlNodeListGetString (doc,
> node->xmlChildrenNode, 1);
>          }
>
> My goal is to include the URI in my logging.c file, and get the value of the
> field:
>
> <mount>
>     <playlist-notify-uri>http://test.com/icecast/notify</playlist-notify-uri>
> </mount>
>
> Basically, I'm having Icecast POST to a certain URI whenever it detects a
> change in metadata. (Which I've already implemented, but now, I need to add
> a setting in the config file for storing this URI.) What is the best
> practice for doing this? I'm looking to access it in logging.c,
> logging_playlist() - where I have a string that represents the mount point.
> I guess the question is... How should I go about selecting the value for
> this field on the specific mountpoint?

You may find it easier to use the stats connection for this, try

curl -X STATS 'http://admin:pw@host:port/' | grep metadata

would that be enough to get the details you want?

karl.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.