initial push
This commit is contained in:
95
etc/icecast2/admin/listclients.xsl
Normal file
95
etc/icecast2/admin/listclients.xsl
Normal file
@ -0,0 +1,95 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats" >
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Icecast2 Admin</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="stats.xsl">Admin Home</a></li>
|
||||
<li><a href="listmounts.xsl">Mountpoint List</a></li>
|
||||
<li><a href="/status.xsl">Public Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<h2>Listener Stats</h2>
|
||||
<xsl:for-each select="source">
|
||||
<div class="roundbox">
|
||||
<div class="mounthead">
|
||||
<h3>Mountpoint <xsl:value-of select="@mount" /></h3>
|
||||
<div class="right">
|
||||
<xsl:choose>
|
||||
<xsl:when test="authenticator">
|
||||
<a class="auth" href="/auth.xsl">Login</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul class="mountlist">
|
||||
<li><a class="play" href="{@mount}.m3u">M3U</a></li>
|
||||
<li><a class="play" href="{@mount}.xspf">XSPF</a></li>
|
||||
<li><a class="play" href="{@mount}.vclt">VCLT</a></li>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mountcont">
|
||||
<ul class="nav">
|
||||
<li class="active"><a href="listclients.xsl?mount={@mount}">List Clients</a></li>
|
||||
<li><a href="moveclients.xsl?mount={@mount}">Move Listeners</a></li>
|
||||
<li><a href="updatemetadata.xsl?mount={@mount}">Update Metadata</a></li>
|
||||
<xsl:if test="authenticator">
|
||||
<li><a href="manageauth.xsl?mount={@mount}">Manage Authentication</a></li>
|
||||
</xsl:if>
|
||||
<li><a href="killsource.xsl?mount={@mount}">Kill Source</a></li>
|
||||
</ul>
|
||||
<xsl:choose>
|
||||
<xsl:when test="listener">
|
||||
<div class="scrolltable">
|
||||
<table class="colortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>IP</td>
|
||||
<td>Sec. connected</td>
|
||||
<td>User Agent</td>
|
||||
<td>Action</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:variable name = "themount"><xsl:value-of select="@mount" /></xsl:variable>
|
||||
<xsl:for-each select="listener">
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="IP" />
|
||||
<xsl:if test="username">
|
||||
(<xsl:value-of select="username" />)
|
||||
</xsl:if>
|
||||
</td>
|
||||
<td><xsl:value-of select="Connected" /></td>
|
||||
<td><xsl:value-of select="UserAgent" /></td>
|
||||
<td><a href="killclient.xsl?mount={$themount}&id={ID}">Kick</a></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p>No listeners connected</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
61
etc/icecast2/admin/listmounts.xsl
Normal file
61
etc/icecast2/admin/listmounts.xsl
Normal file
@ -0,0 +1,61 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats" >
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Icecast2 Admin</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="stats.xsl">Admin Home</a></li>
|
||||
<li><a href="listmounts.xsl">Mountpoint List</a></li>
|
||||
<li><a href="/status.xsl">Public Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<h2>Active Mountpoints</h2>
|
||||
<xsl:for-each select="source">
|
||||
<div class="roundbox">
|
||||
<div class="mounthead">
|
||||
<h3 class="mount">Mountpoint <xsl:value-of select="@mount" /></h3>
|
||||
<div class="right">
|
||||
<xsl:choose>
|
||||
<xsl:when test="authenticator">
|
||||
<a class="auth" href="/auth.xsl">Login</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul class="mountlist">
|
||||
<li><a class="play" href="{@mount}.m3u">M3U</a></li>
|
||||
<li><a class="play" href="{@mount}.xspf">XSPF</a></li>
|
||||
<li><a class="play" href="{@mount}.vclt">VCLT</a></li>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mountcont">
|
||||
<ul class="nav">
|
||||
<li><a href="listclients.xsl?mount={@mount}">List Clients</a></li>
|
||||
<li><a href="moveclients.xsl?mount={@mount}">Move Listeners</a></li>
|
||||
<li><a href="updatemetadata.xsl?mount={@mount}">Update Metadata</a></li>
|
||||
<xsl:if test="authenticator">
|
||||
<li><a href="manageauth.xsl?mount={@mount}">Manage Authentication</a></li>
|
||||
</xsl:if>
|
||||
<li><a href="killsource.xsl?mount={@mount}">Kill Source</a></li>
|
||||
</ul>
|
||||
<p><xsl:value-of select="listeners" /> Listener(s)</p>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
91
etc/icecast2/admin/manageauth.xsl
Normal file
91
etc/icecast2/admin/manageauth.xsl
Normal file
@ -0,0 +1,91 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats" >
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Icecast2 Admin</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="stats.xsl">Admin Home</a></li>
|
||||
<li><a href="listmounts.xsl">Mountpoint List</a></li>
|
||||
<li><a href="/status.xsl">Public Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<h2>Manage Authentication</h2>
|
||||
<xsl:if test="iceresponse">
|
||||
<div class="roundbox">
|
||||
<h3>Message</h3>
|
||||
<xsl:for-each select="iceresponse">
|
||||
<xsl:value-of select="message" /><br />
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="source">
|
||||
<div class="roundbox">
|
||||
<h3>Mountpoint <xsl:value-of select="@mount" />
|
||||
<xsl:if test="server_name">
|
||||
<small><xsl:value-of select="server_name" /></small>
|
||||
</xsl:if>
|
||||
</h3>
|
||||
<ul class="nav">
|
||||
<li><a href="listclients.xsl?mount={@mount}">List Clients</a></li>
|
||||
<li><a href="moveclients.xsl?mount={@mount}">Move Listeners</a></li>
|
||||
<li><a href="updatemetadata.xsl?mount={@mount}">Update Metadata</a></li>
|
||||
<li><a href="manageauth.xsl?mount={@mount}">Manage Authentication</a></li>
|
||||
<li><a href="killsource.xsl?mount={@mount}">Kill Source</a></li>
|
||||
</ul>
|
||||
<xsl:if test="User">
|
||||
<table class="colortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>User</td>
|
||||
<td>Action</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:variable name="themount"><xsl:value-of select="@mount" /></xsl:variable>
|
||||
<xsl:for-each select="User">
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="username" />
|
||||
</td>
|
||||
<td>
|
||||
<a href="manageauth.xsl?mount={$themount}&username={username}&action=delete">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</xsl:if>
|
||||
<form class="alignedform" method="get" action="/admin/manageauth.xsl">
|
||||
<fieldset>
|
||||
<legend>Add new user</legend>
|
||||
<p>
|
||||
<label for="username">Username:</label>
|
||||
<input type="text" id="username" name="username"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" id="password" name="password"/>
|
||||
</p>
|
||||
<input type="hidden" name="mount" value="{@mount}"/>
|
||||
<input type="hidden" name="action" value="add"/>
|
||||
<input type="Submit" value="Add"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
39
etc/icecast2/admin/moveclients.xsl
Normal file
39
etc/icecast2/admin/moveclients.xsl
Normal file
@ -0,0 +1,39 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats" >
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Icecast2 Admin</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="stats.xsl">Admin Home</a></li>
|
||||
<li><a href="listmounts.xsl">Mountpoint List</a></li>
|
||||
<li><a href="/status.xsl">Public Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<xsl:variable name = "currentmount" ><xsl:value-of select="current_source" /></xsl:variable>
|
||||
<h2>Moving listeners from <xsl:value-of select="current_source" /></h2>
|
||||
<div class="roundbox">
|
||||
<h3>Move to which mountpoint?</h3>
|
||||
<xsl:for-each select="source">
|
||||
<p>
|
||||
Move from <code><xsl:copy-of select="$currentmount" /></code> to <code><xsl:value-of select="@mount" /></code><br />
|
||||
<xsl:value-of select="listeners" /> listeners<br />
|
||||
<a href="moveclients.xsl?mount={$currentmount}&destination={@mount}">Move clients</a>
|
||||
</p>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
35
etc/icecast2/admin/response.xsl
Normal file
35
etc/icecast2/admin/response.xsl
Normal file
@ -0,0 +1,35 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/iceresponse" >
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Icecast2 Admin</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="stats.xsl">Admin Home</a></li>
|
||||
<li><a href="listmounts.xsl">Mountpoint List</a></li>
|
||||
<li><a href="/status.xsl">Public Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<h2>Icecast Server Response</h2>
|
||||
<xsl:for-each select="/iceresponse">
|
||||
<div class="roundbox">
|
||||
<h3>Response</h3>
|
||||
<p>Message: <xsl:value-of select="message" /></p>
|
||||
<p>Return Code: <xsl:value-of select="return" /></p>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
100
etc/icecast2/admin/stats.xsl
Normal file
100
etc/icecast2/admin/stats.xsl
Normal file
@ -0,0 +1,100 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats" >
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Icecast2 Admin</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="stats.xsl">Admin Home</a></li>
|
||||
<li><a href="listmounts.xsl">Mountpoint List</a></li>
|
||||
<li><a href="/status.xsl">Public Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<!--global server stats-->
|
||||
<div class="roundbox">
|
||||
<h3>Global Server Stats</h3>
|
||||
<table class="yellowkeys">
|
||||
<tbody>
|
||||
<xsl:for-each select="/icestats">
|
||||
<xsl:for-each select="*">
|
||||
<xsl:if test = "name()!='source'">
|
||||
<tr>
|
||||
<td><xsl:value-of select="name()" /></td>
|
||||
<td><xsl:value-of select="." /></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--end global server stats-->
|
||||
|
||||
<!--mount point stats-->
|
||||
<xsl:for-each select="source">
|
||||
<xsl:if test = "listeners!=''">
|
||||
<div class="roundbox">
|
||||
<div class="mounthead">
|
||||
<h3 class="mount">Mountpoint <xsl:value-of select="@mount" /></h3>
|
||||
<div class="right">
|
||||
<xsl:choose>
|
||||
<xsl:when test="authenticator">
|
||||
<a class="auth" href="/auth.xsl">Login</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul class="mountlist">
|
||||
<li><a class="play" href="{@mount}.m3u">M3U</a></li>
|
||||
<li><a class="play" href="{@mount}.xspf">XSPF</a></li>
|
||||
<li><a class="play" href="{@mount}.vclt">VCLT</a></li>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mountcont">
|
||||
<ul class="nav">
|
||||
<li><a href="listclients.xsl?mount={@mount}">List Clients</a></li>
|
||||
<li><a href="moveclients.xsl?mount={@mount}">Move Listeners</a></li>
|
||||
<li><a href="updatemetadata.xsl?mount={@mount}">Update Metadata</a></li>
|
||||
<xsl:if test="authenticator">
|
||||
<li><a href="manageauth.xsl?mount={@mount}">Manage Authentication</a></li>
|
||||
</xsl:if>
|
||||
<li><a href="killsource.xsl?mount={@mount}">Kill Source</a></li>
|
||||
</ul>
|
||||
<xsl:if test="server_type and ((server_type = 'application/ogg') or (server_type = 'audio/ogg'))">
|
||||
<div class="audioplayer">
|
||||
<audio controls="controls" preload="none">
|
||||
<source src="{@mount}" type="{server_type}" />
|
||||
</audio>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<table class="yellowkeys">
|
||||
<tbody>
|
||||
<xsl:for-each select="*">
|
||||
<tr>
|
||||
<td><xsl:value-of select="name()" /></td>
|
||||
<td><xsl:value-of select="." /></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<!--end mount point stats-->
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
49
etc/icecast2/admin/updatemetadata.xsl
Normal file
49
etc/icecast2/admin/updatemetadata.xsl
Normal file
@ -0,0 +1,49 @@
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
|
||||
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Icecast Streaming Media Server</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Icecast2 Admin</h1>
|
||||
<!--index header menu -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="stats.xsl">Admin Home</a></li>
|
||||
<li><a href="listmounts.xsl">Mountpoint List</a></li>
|
||||
<li><a href="/status.xsl">Public Home</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--end index header menu -->
|
||||
<h2>Update Metadata</h2>
|
||||
<xsl:for-each select="source">
|
||||
<div class="roundbox">
|
||||
<h3>Mountpoint <xsl:value-of select="@mount" />
|
||||
<xsl:if test="server_name">
|
||||
<small><xsl:value-of select="server_name" /></small>
|
||||
</xsl:if>
|
||||
</h3>
|
||||
<form class="alignedform" method="get" action="/admin/metadata.xsl">
|
||||
<p>
|
||||
<label for="song">Metadata:</label>
|
||||
<input type="text" id="song" name="song"/>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Update"/>
|
||||
<input type="hidden" name="mount" value="{@mount}"/>
|
||||
<input type="hidden" name="mode" value="updinfo"/>
|
||||
<input type="hidden" name="charset" value="UTF-8"/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
<div id="footer">
|
||||
Support icecast development at <a href="https://www.icecast.org/">www.icecast.org</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
54
etc/icecast2/admin/vclt.xsl
Normal file
54
etc/icecast2/admin/vclt.xsl
Normal file
@ -0,0 +1,54 @@
|
||||
<!--
|
||||
VCLT xslt stylesheet for Icecast 2.3.2 and above
|
||||
based on XSPF xslt stylesheet.
|
||||
Copyright (C) 2007 Thomas B. Ruecker, <thomas@ruecker.fi>
|
||||
Copyright (C) 2011 Philipp Schafft, <lion@lion.leolix.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the
|
||||
Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="yes" media-type="audio/x-vclt"
|
||||
method="text" indent="no" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats" >
|
||||
<xsl:for-each select="source">STREAMURL=<xsl:value-of select="listenurl" />
|
||||
<xsl:if test="artist"><xsl:text>
|
||||
</xsl:text>ARTIST=<xsl:value-of select="artist" /></xsl:if>
|
||||
<xsl:if test="title"><xsl:text>
|
||||
</xsl:text>TITLE=<xsl:value-of select="title" /></xsl:if>
|
||||
|
||||
<xsl:if test="server_name"><xsl:text>
|
||||
</xsl:text>SERVER_NAME=<xsl:value-of select="server_name" /></xsl:if>
|
||||
<xsl:if test="server_description"><xsl:text>
|
||||
</xsl:text>DESCRIPTION=<xsl:value-of select="server_description" /></xsl:if>
|
||||
SIGNALINFO=<xsl:choose>
|
||||
<xsl:when test="server_type = 'application/ogg'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="subtype = 'Vorbis'">codec:ogg_vorbis</xsl:when>
|
||||
<!-- More codecs should be added here, however I don't know how to find out about the codec.
|
||||
At the moment we just guess that application/ogg is a Ogg bitstream with some undefined
|
||||
codec. Everything else is undefined.
|
||||
-->
|
||||
<xsl:otherwise>codec:ogg_general</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose><xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:if test="genre">GENRE=<xsl:value-of select="genre" /></xsl:if>
|
||||
==
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
73
etc/icecast2/admin/xspf.xsl
Normal file
73
etc/icecast2/admin/xspf.xsl
Normal file
@ -0,0 +1,73 @@
|
||||
<!--
|
||||
XSPF xslt stylesheet for Icecast and above
|
||||
Copyright (C) 2007 Thomas B. Ruecker, <thomas@ruecker.fi>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the
|
||||
Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
|
||||
<xsl:output omit-xml-declaration="no" media-type="application/xspf+xml"
|
||||
method="xml" indent="yes" encoding="UTF-8" />
|
||||
<xsl:template match = "/icestats" >
|
||||
<playlist version="1" xmlns="http://xspf.org/ns/0/">
|
||||
<title><xsl:value-of select="server" /></title>
|
||||
<creator><xsl:value-of select="server" /></creator>
|
||||
<trackList >
|
||||
<!-- end of "header" -->
|
||||
|
||||
<xsl:for-each select="source">
|
||||
|
||||
<track>
|
||||
<location><xsl:value-of select="listenurl" /></location>
|
||||
|
||||
|
||||
<xsl:if test="artist"><creator><xsl:value-of select="artist" /></creator></xsl:if>
|
||||
<title><xsl:value-of select="title" /></title>
|
||||
<!-- The <xsl:text>\n</xsl:text> elements in the following part are used
|
||||
to enforce linebreaks this format seems to be expected by clients -->
|
||||
<annotation>
|
||||
<xsl:if test="server_name">Stream Title: <xsl:value-of select="server_name" /><xsl:text>
|
||||
</xsl:text></xsl:if>
|
||||
<xsl:if test="server_description">Stream Description: <xsl:value-of select="server_description" /></xsl:if>
|
||||
Content Type:<xsl:value-of select="server_type" /><xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:if test="bitrate">Bitrate: <xsl:value-of select="bitrate" /><xsl:text>
|
||||
</xsl:text></xsl:if>
|
||||
<xsl:if test="quality">Quality: <xsl:value-of select="quality" /><xsl:text>
|
||||
</xsl:text></xsl:if>
|
||||
<xsl:if test="video_quality">Video Quality: <xsl:value-of select="video_quality" /><xsl:text>
|
||||
</xsl:text></xsl:if>
|
||||
<xsl:if test="frame_size">Framesize: <xsl:value-of select="frame_size" /><xsl:text>
|
||||
</xsl:text></xsl:if>
|
||||
<xsl:if test="frame_rate">Framerate: <xsl:value-of select="frame_rate" /><xsl:text>
|
||||
</xsl:text></xsl:if>
|
||||
<xsl:if test="listeners">Current Listeners: <xsl:value-of select="listeners" /><xsl:text>
|
||||
</xsl:text></xsl:if>
|
||||
<xsl:if test="listener_peak">Peak Listeners: <xsl:value-of select="listener_peak" /><xsl:text>
|
||||
</xsl:text></xsl:if>
|
||||
<xsl:if test="genre">Stream Genre: <xsl:value-of select="genre" /></xsl:if>
|
||||
</annotation>
|
||||
|
||||
<xsl:if test="server_url"><info><xsl:value-of select="server_url" /></info></xsl:if>
|
||||
|
||||
</track>
|
||||
|
||||
</xsl:for-each>
|
||||
</trackList>
|
||||
</playlist>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
Reference in New Issue
Block a user