1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

Update: Disable links and player on status page when direct access is not allowed

Closes: #2409
This commit is contained in:
Philipp Schafft 2022-02-28 11:16:34 +00:00
parent b7e204e3a7
commit 6aa937e55f
2 changed files with 21 additions and 17 deletions

View File

@ -1,5 +1,6 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template name="player">
<xsl:if test="not(allow-direct-access) or allow-direct-access = 'true'">
<div>
<ul class="playlists">
<li><a href="{@mount}">Direct</a></li>
@ -19,5 +20,6 @@
</div>
</xsl:if>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@ -1024,6 +1024,8 @@ static void source_apply_mount (ice_config_t *config, source_t *source, mount_pr
source->allow_direct_access = mountinfo->allow_direct_access;
}
stats_event(source->mount, "allow-direct-access", source->allow_direct_access ? "true" : "false");
/* if a setting is available in the mount details then use it, else
* check the parser details. */