]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlist.m
Add a function to get the Title and fallback to the name if the title is empty.
[vlc] / modules / gui / macosx / playlist.m
index d01375d9adb4a5b5a3dc9650959a1cadf6b06b03..d777d4ae864edec3715a16ff20e41e0e32b23f9d 100644 (file)
     if( [[o_tc identifier] isEqualToString:@"name"] )
     {
         /* sanity check to prevent the NSString class from crashing */
-        char *psz_title =  input_item_GetTitle( p_item->p_input );
-        if( !EMPTY_STR( psz_title ) )
+        char *psz_title =  input_item_GetTitleFbName( p_item->p_input );
+        if( psz_title )
         {
             o_value = [NSString stringWithUTF8String: psz_title];
+            free( psz_title );
         }
-        else
-        {
-            char *psz_name = input_item_GetName( p_item->p_input );
-            if( psz_name )
-                o_value = [NSString stringWithUTF8String: psz_name];
-            free( psz_name );
-        }
-        free( psz_title );
     }
     else if( [[o_tc identifier] isEqualToString:@"artist"] )
     {