]> git.sesse.net Git - vlc/commitdiff
skins2: show the human readible name of the playlist item by default.
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Mon, 12 Mar 2012 13:53:20 +0000 (14:53 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Mon, 12 Mar 2012 14:43:02 +0000 (15:43 +0100)
The skins2 GUI showed the URI by default, but this is not what most people expect.

modules/gui/skins2/vars/playtree.cpp

index 918d4b147ff62eb6fe51487a17c04555ff6a6e3a..6ce1b86eb2ac4c96f89a2d569cb25eec2b8ada0f 100644 (file)
@@ -116,7 +116,9 @@ void Playtree::onUpdateItem( int id )
             return;
         }
 
-        UString *pName = new UString( getIntf(), pNode->p_input->psz_name );
+        char *psz_name = input_item_GetTitleFbName( pNode->p_input );
+        UString *pName = new UString( getIntf(), psz_name );
+        free(psz_name);
         playlist_Unlock( m_pPlaylist );
 
         if( *pName != *(it->getString()) )
@@ -217,8 +219,9 @@ void Playtree::onAppend( playlist_add_t *p_add )
         for( pos = 0; pos < pItem->p_parent->i_children; pos++ )
             if( pItem->p_parent->pp_children[pos] == pItem ) break;
 
-        UString *pName = new UString( getIntf(),
-                                      pItem->p_input->psz_name );
+        char *psz_name = input_item_GetTitleFbName( pItem->p_input );
+        UString *pName = new UString( getIntf(), psz_name );
+        free( psz_name );
 
         playlist_item_t* current = playlist_CurrentPlayingItem( m_pPlaylist );