]> git.sesse.net Git - vlc/commitdiff
* prefer playlist item's meta title over its name, if available. This work-arounds...
authorFelix Paul Kühne <fkuehne@videolan.org>
Mon, 28 May 2007 20:59:00 +0000 (20:59 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 28 May 2007 20:59:00 +0000 (20:59 +0000)
modules/gui/macosx/playlist.m

index f2562128469fea7e46b35ac4411680d6844b0c18..aeba4123db44de9b6e763d23d30dbbcd27ed9b5c 100644 (file)
     if( [[o_tc identifier] isEqualToString:@"1"] )
     {
         /* sanity check to prevent the NSString class from crashing */
-        if( p_item->p_input->psz_name != NULL )
+        if( p_item->p_input->p_meta && p_item->p_input->p_meta->psz_title && 
+            *p_item->p_input->p_meta->psz_title )
+        {
+            o_value = [NSString stringWithUTF8String:
+                p_item->p_input->p_meta->psz_title];
+            if( o_value == NULL )
+                o_value = [NSString stringWithCString:
+                    p_item->p_input->p_meta->psz_title];
+        } 
+        else if( p_item->p_input->psz_name != NULL )
         {
             o_value = [NSString stringWithUTF8String:
                 p_item->p_input->psz_name];