Commit 4a3d46bd authored by Clément Stenac's avatar Clément Stenac

* Don't reset input meta information

* Improve notification layout
parent a378f1a7
...@@ -12,3 +12,4 @@ SOURCES_gnutls = gnutls.c ...@@ -12,3 +12,4 @@ SOURCES_gnutls = gnutls.c
SOURCES_svg = svg.c SOURCES_svg = svg.c
SOURCES_msn = msn.c SOURCES_msn = msn.c
SOURCES_growl = growl.c SOURCES_growl = growl.c
SOURCES_notify = notify.c
...@@ -139,6 +139,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -139,6 +139,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
p_playlist = (playlist_t *)vlc_object_find( p_this, VLC_OBJECT_PLAYLIST, p_playlist = (playlist_t *)vlc_object_find( p_this, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( !p_playlist ) return VLC_EGENERIC; if( !p_playlist ) return VLC_EGENERIC;
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
...@@ -160,7 +161,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -160,7 +161,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
strdup( _("no album") ); strdup( _("no album") );
psz_title = strdup( p_input->input.p_item->psz_name ); psz_title = strdup( p_input->input.p_item->psz_name );
if( psz_title == NULL ) psz_title = strdup( N_("(no title)") ); if( psz_title == NULL ) psz_title = strdup( N_("(no title)") );
snprintf( psz_tmp, MAX_LENGTH, "%s - %s - %s", snprintf( psz_tmp, MAX_LENGTH, "<b>%s</b>\n%s - %s",
psz_title, psz_artist, psz_album ); psz_title, psz_artist, psz_album );
free( psz_title ); free( psz_title );
free( psz_artist ); free( psz_artist );
......
...@@ -149,6 +149,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, ...@@ -149,6 +149,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->input.b_eof = VLC_FALSE; p_input->input.b_eof = VLC_FALSE;
p_input->input.i_cr_average = 0; p_input->input.i_cr_average = 0;
if( !p_input->input.p_item->p_meta )
p_input->input.p_item->p_meta = vlc_meta_New(); p_input->input.p_item->p_meta = vlc_meta_New();
stats_ReinitInputStats( p_item->p_stats ); stats_ReinitInputStats( p_item->p_stats );
......
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