* 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 f256212..aeba412 100644 (file)
     if( [[o_tc identifier] isEqualToString:@"1"] )
     {
         /* sanity check to prevent the NSString class from crashing */
     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];
         {
             o_value = [NSString stringWithUTF8String:
                 p_item->p_input->psz_name];