[vlc-devel] [PATCH] access/http: WIP update Icy metadata on change (close #9332)
Felix Paul Kühne
fkuehne at videolan.org
Sun Apr 27 17:40:41 CEST 2014
---
modules/access/http.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index 7fdbb68..acde1a3 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -871,9 +871,10 @@ static int ReadICYMeta( access_t *p_access )
p_sys->psz_icy_title = EnsureUTF8( psz_tmp );
if( !p_sys->psz_icy_title )
free( psz_tmp );
- //p_access->info.i_update |= INPUT_UPDATE_META; FIXME
- msg_Dbg( p_access, "New Title=%s", p_sys->psz_icy_title );
+ msg_Dbg( p_access, "New Icy-Title=%s", p_sys->psz_icy_title );
+ input_item_t *p_input_item = input_GetItem(p_access->p_input);
+ input_item_SetMeta(p_input_item, vlc_meta_Title, p_sys->psz_icy_title);
}
}
free( psz_meta );
@@ -1453,6 +1454,8 @@ static int Request( access_t *p_access, uint64_t i_tell )
if( !p_sys->psz_icy_name )
free( psz_tmp );
msg_Dbg( p_access, "Icy-Name: %s", p_sys->psz_icy_name );
+ input_item_t *p_input_item = input_GetItem(p_access->p_input);
+ input_item_SetMeta(p_input_item, vlc_meta_Artist, p_sys->psz_icy_name);
p_sys->b_icecast = true; /* be on the safeside. set it here as well. */
p_sys->b_reconnect = true;
@@ -1466,6 +1469,8 @@ static int Request( access_t *p_access, uint64_t i_tell )
if( !p_sys->psz_icy_genre )
free( psz_tmp );
msg_Dbg( p_access, "Icy-Genre: %s", p_sys->psz_icy_genre );
+ input_item_t *p_input_item = input_GetItem(p_access->p_input);
+ input_item_SetMeta(p_input_item, vlc_meta_Genre, p_sys->psz_icy_genre);
}
else if( !strncasecmp( psz, "Icy-Notice", 10 ) )
{
--
1.8.5.2 (Apple Git-48)
More information about the vlc-devel
mailing list