- QString url;
- char *psz_art = input_item_GetArtURL( input_GetItem( p_input ) );
- url.sprintf("%s", psz_art );
- free( psz_art );
- if( artUrl != url )
- {
- artUrl = url.replace( "file://",QString("" ) );
- emit artChanged( artUrl );
- }
+ char *psz_name = input_item_GetTitle( input_GetItem( p_input ) );
+ if( EMPTY_STR( psz_name ) )
+ {
+ free( psz_name );
+ psz_name = input_item_GetName( input_GetItem( p_input ) );
+ }
+
+ char *psz_nowplaying =
+ input_item_GetNowPlaying( input_GetItem( p_input ) );
+ if( !EMPTY_STR( psz_nowplaying ) )
+ {
+ text.sprintf( "%s - %s", psz_nowplaying, psz_name );
+ }
+ else
+ {
+ char *psz_artist = input_item_GetArtist( input_GetItem( p_input ) );
+ if( !EMPTY_STR( psz_artist ) )
+ {
+ text.sprintf( "%s - %s", psz_artist, psz_name );
+ }
+ free( psz_artist );
+ }
+ else
+ {
+ text.sprintf( "%s", psz_name );
+ }
+ free( psz_name );
+ free( psz_nowplaying );
+
+ if( old_name != text )
+ {
+ emit nameChanged( text );
+ old_name=text;
+ }
+
+ /* Update meta */
+ QString url;
+ char *psz_art = input_item_GetArtURL( input_GetItem( p_input ) );
+ url.sprintf("%s", psz_art );
+ free( psz_art );
+ if( artUrl != url )
+ {
+ artUrl = url.replace( "file://",QString("" ) );
+ emit artChanged( artUrl );
+ }
+
+ /* Update ZVBI status */