From 11db57b55bf2da16a178b65df57e628ae7470257 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Mon, 28 May 2007 20:59:00 +0000 Subject: [PATCH] * prefer playlist item's meta title over its name, if available. This work-arounds a rare bug: VLC sometimes tends to show a previous item's name instead of the current one. --- modules/gui/macosx/playlist.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index f256212846..aeba4123db 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -271,7 +271,16 @@ 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]; -- 2.39.2