1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

Feature: Emit new format-metadata-changed event on metadata change

This commit is contained in:
Philipp Schafft 2022-09-24 11:21:10 +00:00 committed by Philipp Schafft
parent 264bba614b
commit 87a5179e0d
2 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,7 @@
#include "global.h"
#include "refbuf.h"
#include "event.h"
#include "source.h"
#include "client.h"
#include "connection.h"
@ -189,6 +190,7 @@ static void filter_shoutcast_metadata (source_t *source, char *metadata, unsigne
{
memcpy (p, metadata+13, len);
logging_playlist (source->mount, p, source->listeners);
event_emit_va("format-metadata-changed", EVENT_EXTRA_SOURCE, source, EVENT_EXTRA_LIST_END);
stats_event_conv (source->mount, "title", p, source->format->charset);
stats_event_conv (source->mount, "display-title", p, source->format->charset);
if (update_vc)

View File

@ -33,6 +33,7 @@
#include "stats.h"
#include "playlist.h"
#include "event.h"
#include "format.h"
#include "format_ogg.h"
#include "format_vorbis.h"
@ -363,6 +364,7 @@ static refbuf_t *complete_buffer (source_t *source, refbuf_t *refbuf)
if (ogg_info->log_metadata)
{
update_comments (source);
event_emit_va("format-metadata-changed", EVENT_EXTRA_SOURCE, source, EVENT_EXTRA_LIST_END);
ogg_info->log_metadata = 0;
}
/* listeners can start anywhere unless the codecs themselves are