Commit 5080dbf5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

access/http: update Icy metadata on change (close #9332)

parent 58e4b459
...@@ -871,9 +871,16 @@ static int ReadICYMeta( access_t *p_access ) ...@@ -871,9 +871,16 @@ static int ReadICYMeta( access_t *p_access )
p_sys->psz_icy_title = EnsureUTF8( psz_tmp ); p_sys->psz_icy_title = EnsureUTF8( psz_tmp );
if( !p_sys->psz_icy_title ) if( !p_sys->psz_icy_title )
free( psz_tmp ); 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_thread_t *p_input = access_GetParentInput( p_access );
if( p_input )
{
input_item_t *p_input_item = input_GetItem( p_access->p_input );
if( p_input_item )
input_item_SetMeta( p_input_item, vlc_meta_NowPlaying, p_sys->psz_icy_title );
vlc_object_release( p_input );
}
} }
} }
free( psz_meta ); free( psz_meta );
...@@ -1453,6 +1460,14 @@ static int Request( access_t *p_access, uint64_t i_tell ) ...@@ -1453,6 +1460,14 @@ static int Request( access_t *p_access, uint64_t i_tell )
if( !p_sys->psz_icy_name ) if( !p_sys->psz_icy_name )
free( psz_tmp ); free( psz_tmp );
msg_Dbg( p_access, "Icy-Name: %s", p_sys->psz_icy_name ); msg_Dbg( p_access, "Icy-Name: %s", p_sys->psz_icy_name );
input_thread_t *p_input = access_GetParentInput( p_access );
if ( p_input )
{
input_item_t *p_input_item = input_GetItem( p_access->p_input );
if ( p_input_item )
input_item_SetMeta( p_input_item, vlc_meta_Title, p_sys->psz_icy_name );
vlc_object_release( p_input );
}
p_sys->b_icecast = true; /* be on the safeside. set it here as well. */ p_sys->b_icecast = true; /* be on the safeside. set it here as well. */
p_sys->b_reconnect = true; p_sys->b_reconnect = true;
...@@ -1466,6 +1481,14 @@ static int Request( access_t *p_access, uint64_t i_tell ) ...@@ -1466,6 +1481,14 @@ static int Request( access_t *p_access, uint64_t i_tell )
if( !p_sys->psz_icy_genre ) if( !p_sys->psz_icy_genre )
free( psz_tmp ); free( psz_tmp );
msg_Dbg( p_access, "Icy-Genre: %s", p_sys->psz_icy_genre ); msg_Dbg( p_access, "Icy-Genre: %s", p_sys->psz_icy_genre );
input_thread_t *p_input = access_GetParentInput( p_access );
if( p_input )
{
input_item_t *p_input_item = input_GetItem( p_access->p_input );
if( p_input_item )
input_item_SetMeta( p_input_item, vlc_meta_Genre, p_sys->psz_icy_genre );
vlc_object_release( p_input );
}
} }
else if( !strncasecmp( psz, "Icy-Notice", 10 ) ) else if( !strncasecmp( psz, "Icy-Notice", 10 ) )
{ {
......
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