Commit 88e2cdd4 authored by Philipp Schafft's avatar Philipp Schafft 🦁

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

parent ea6dd695
......@@ -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);
......@@ -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);
......@@ -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;
......@@ -102,12 +102,7 @@
<td>Currently playing:</td>
<td class="streamstats">
<xsl:if test="artist">
<xsl:value-of select="artist" /> -
<xsl:value-of select="title" />
<td class="streamstats"><xsl:value-of select="display-title" /></td>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment