From: Felix Paul Kühne Date: Mon, 28 May 2007 20:59:00 +0000 (+0000) Subject: * prefer playlist item's meta title over its name, if available. This work-arounds... X-Git-Tag: 0.9.0-test0~7216 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=11db57b55bf2da16a178b65df57e628ae7470257;p=vlc * 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. --- 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];