1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Feature: Added a stats.xml entry <display-title> to replace <title>, and <artist>

This commit is contained in:
Philipp Schafft 2020-10-11 15:30:18 +00:00
parent ea6dd6954a
commit 88e2cdd465
4 changed files with 4 additions and 7 deletions

View File

@ -180,6 +180,7 @@ static void filter_shoutcast_metadata (source_t *source, char *metadata, unsigne
memcpy (p, metadata+13, len);
logging_playlist (source->mount, p, source->listeners);
stats_event_conv (source->mount, "title", p, source->format->charset);
stats_event_conv (source->mount, "display-title", p, source->format->charset);
format_set_vorbiscomment(source->format, MP3_METADATA_TITLE, p);
yp_touch (source->mount);
free (p);

View File

@ -319,6 +319,7 @@ static void update_comments(source_t *source)
}
stats_event (source->mount, "artist", artist);
stats_event (source->mount, "title", title);
stats_event (source->mount, "display-title", title);
playlist_push_track(source->history, &source->format->vc);

View File

@ -855,7 +855,7 @@ static inline int __include_node(unsigned int flags, const char *key, const char
static xmlNodePtr _dump_stats_to_doc (xmlNodePtr root, unsigned int flags, const char *show_mount, client_t *client) {
static const char *public_keys_global[] = {"admin", "location", "host", "server_id", "server_start_iso8601", NULL};
static const char *public_keys_source[] = {"listeners", "server_name", "server_description", "stream_start_iso8601", "subtype", "content-type", "listenurl", "genre", NULL};
static const char *public_keys_source[] = {"listeners", "server_name", "server_description", "stream_start_iso8601", "subtype", "content-type", "listenurl", "genre", "display-title", NULL};
int hidden = flags & STATS_XML_FLAG_SHOW_HIDDEN ? 1 : 0;
avl_node *avlnode;
xmlNodePtr ret = NULL;

View File

@ -102,12 +102,7 @@
</xsl:if>
<tr>
<td>Currently playing:</td>
<td class="streamstats">
<xsl:if test="artist">
<xsl:value-of select="artist" /> -
</xsl:if>
<xsl:value-of select="title" />
</td>
<td class="streamstats"><xsl:value-of select="display-title" /></td>
</tr>
</tbody>
</table>