]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/playlist_manager.cpp
qt4 fullscreen: Uses FIND_ANYWHERE to find vout, fixes trax issue 24
[vlc] / modules / gui / wxwidgets / playlist_manager.cpp
index d9ba45313ec9084a3326581195b43cef0d80c523..aa867879249bd6dc34cdf014e02a1d6b1823d0f1 100644 (file)
@@ -299,21 +299,16 @@ void PlaylistManager::UpdateTreeItem( wxTreeItemId item )
     wxString msg;
     wxString duration = wxU( "" );
 
-    char *psz_artist;
-    if( input_item_GetArtist( o_item->p_input ) )
-    {
-        psz_artist = strdup( input_item_GetArtist( o_item->p_input ) );
-    }
-    else psz_artist = strdup( "" );
-
+    char *psz_artist = input_item_GetArtist( p_item->p_input );
     if( !psz_artist )
-    {
-        UnlockPlaylist( p_intf->p_sys, p_playlist );
-        return;
-    }
+        psz_artist = strdup( "" );
+
+    char *psz_name = input_item_GetName( p_item->p_input );
+    if( !psz_name )
+        psz_name = strdup( "" );
 
     char psz_duration[MSTRTIME_MAX_SIZE];
-    mtime_t dur = p_item->p_input->i_duration;
+    mtime_t dur = input_item_GetDuration( p_item->p_input );
 
     if( dur != -1 )
     {
@@ -324,14 +319,15 @@ void PlaylistManager::UpdateTreeItem( wxTreeItemId item )
 
     if( !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE )
     {
-        msg = wxString( wxU( p_item->p_input->psz_name ) ) + duration;
+        msg = wxString( wxU( psz_name ) ) + duration;
     }
     else
     {
         msg = wxString(wxU( psz_artist )) + wxT(" - ") +
-                    wxString(wxU(p_item->p_input->psz_name)) + duration;
+                    wxString(wxU(psz_name)) + duration;
     }
     free( psz_artist );
+    free( psz_name );
     treectrl->SetItemText( item , msg );
     treectrl->SetItemImage( item, p_item->p_input->i_type );