Philipp Schafft:> > - check icecast status and parse response > > Parsing the status page is *always* *wrong*. If you you would want to > access status data just use the API.interesting! I've been parsing status-json.xsl for years in apps and scripts, in order to check for mountpoints, and it never has failed. Can't be so wrong ;) Curious, what does "API" refer to? Something like http://192.168.1.10:8000/admin/listmounts ? bests, u.
Philipp Schafft
2021-Dec-10 11:50 UTC
[Icecast] Prefered way to check if mountpoint is in use
Good morning, On Fri, 2021-12-10 at 12:22 +0100, unosonic wrote:> Philipp Schafft: > > > - check icecast status and parse response > > > > Parsing the status page is *always* *wrong*. If you you would want > > to access status data just use the API. > > interesting! I've been parsing status-json.xsl for years in apps and > scripts, in order to check for mountpoints, and it never has failed. > Can't be so wrong ;)I was mostly referring to the generated HTML. For the old JSON there are known bugs. If they do not bite you, nothing wrong with using this. For 2.5.x we deprecated the status-json.xsl (it is still there, but will see no more updates). The new interface can be found at /admin/publicstats.> Curious, what does "API" refer to? Something like > http://192.168.1.10:8000/admin/listmounts ? > bests, u.By API I generally mean anything that is not meant for human consumption. So basically everything that is not HTML. Please also keep in mind that for every bit of HTML Icecast generates there is an non-HTML API call. With best regards, -- Philipp Schafft (CEO/Gesch?ftsf?hrer) Telephon: +49.3535 490 17 92 L?wenfelsen UG (haftungsbeschr?nkt) Registration number: Bickinger Stra?e 21 HRB 12308 CB 04916 Herzberg (Elster) VATIN/USt-ID: Germany DE305133015 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: This is a digitally signed message part URL: <http://lists.xiph.org/pipermail/icecast/attachments/20211210/45ecc156/attachment.sig>
Jordan Erickson
2021-Dec-10 16:40 UTC
[Icecast] Prefered way to check if mountpoint is in use
The status pages are dynamic and the developers do not guarantee that they will stay the same. This means the method you use to parse them may break randomly with updates. Using the API itself guarantees a stable interface to query between versions. At least that's how I understand everything. API: https://en.wikipedia.org/wiki/API Cheers, Jordan Erickson On 12/10/21 3:22 AM, unosonic wrote:> Philipp Schafft: >>> - check icecast status and parse response >> Parsing the status page is *always* *wrong*. If you you would want to >> access status data just use the API. > interesting! I've been parsing status-json.xsl for years in apps and scripts, > in order to check for mountpoints, and it never has failed. Can't be so wrong ;) > Curious, what does "API" refer to? Something like > http://192.168.1.10:8000/admin/listmounts ? > bests, u.