+ char *psz_artist = input_item_GetArtist( p_item->p_input );
+ if( [[o_tc identifier] isEqualToString:@"2"] && !EMPTY_STR( psz_artist ) )
+ {
+ o_value = [NSString stringWithUTF8String: psz_artist];
+ if( o_value == NULL )
+ o_value = [NSString stringWithCString: psz_artist];
+ }
+ else if( [[o_tc identifier] isEqualToString:@"3"] )
+ {
+ char psz_duration[MSTRTIME_MAX_SIZE];
+ mtime_t dur = input_item_GetDuration( p_item->p_input );
+ if( dur != -1 )
+ {
+ secstotimestr( psz_duration, dur/1000000 );
+ o_value = [NSString stringWithUTF8String: psz_duration];
+ }
+ else
+ {
+ o_value = @"-:--:--";
+ }
+ }
+ free( psz_artist );
+ }
+
+ return( o_value );
+}
+
+@end
+
+/*****************************************************************************
+ * VLCPlaylistWizard implementation
+ *****************************************************************************/
+@implementation VLCPlaylistWizard
+
+- (IBAction)reloadOutlineView
+{
+ /* Only reload the outlineview if the wizard window is open since this can
+ be quite long on big playlists */
+ if( [[o_outline_view window] isVisible] )
+ {
+ [o_outline_view reloadData];
+ }
+}
+
+@end
+
+/*****************************************************************************
+ * extension to NSOutlineView's interface to fix compilation warnings
+ * and let us access these 2 functions properly
+ * this uses a private Apple-API, but works fine on all current OSX releases
+ * keep checking for compatiblity with future releases though
+ *****************************************************************************/
+
+@interface NSOutlineView (UndocumentedSortImages)
++ (NSImage *)_defaultTableHeaderSortImage;
++ (NSImage *)_defaultTableHeaderReverseSortImage;
+@end
+
+
+/*****************************************************************************
+ * VLCPlaylist implementation
+ *****************************************************************************/
+@implementation VLCPlaylist
+
+- (id)init
+{
+ self = [super init];
+ if ( self != nil )
+ {
+ o_nodes_array = [[NSMutableArray alloc] init];
+ o_items_array = [[NSMutableArray alloc] init];