/*****************************************************************************
r playlistinfo.m: MacOS X interface module
*****************************************************************************
- * Copyright (C) 2002-2004 VideoLAN
+ * Copyright (C) 2002-2005 the VideoLAN team
* $Id$
*
* Authors: Benjamin Pracht <bigben at videolan dot org>
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
char *psz_temp;
vlc_mutex_lock( &p_item->input.lock );
-
/*fill uri / title / author info */
if( p_item->input.psz_uri )
{
[NSString stringWithCString:p_item->input.psz_name] :
[NSString stringWithUTF8String:p_item->input.psz_name]];
}
-
- psz_temp = playlist_ItemGetInfo( p_item, _("General"), _("Author") );
vlc_mutex_unlock( &p_item->input.lock );
+ psz_temp = vlc_input_item_GetInfo( &p_item->input, _("Meta-information"), _("Artist") );
+
if( psz_temp )
{
[o_author_txt setStringValue: [NSString stringWithUTF8String: psz_temp]];
+ free( psz_temp );
}
- free( psz_temp );
-
[[VLCInfoTreeItem rootItem] refresh];
[o_outline_view reloadData];
FIND_ANYWHERE );
vlc_value_t val;
- if ([self isItemInPlaylist: p_item] )
+ if( [self isItemInPlaylist: p_item] )
{
vlc_mutex_lock( &p_item->input.lock );
p_item->input.psz_uri = strdup( [[o_uri_txt stringValue] UTF8String] );
p_item->input.psz_name = strdup( [[o_title_txt stringValue] UTF8String] );
- vlc_input_item_AddInfo( &p_item->input, _("General"), _("Author"), [[o_author_txt stringValue] UTF8String]);
vlc_mutex_unlock( &p_item->input.lock );
+ vlc_input_item_AddInfo( &p_item->input, _("Meta-information"), _("Artist"), [[o_author_txt stringValue] UTF8String]);
val.b_bool = VLC_TRUE;
- var_Set( p_playlist,"intf-change",val );
+ var_Set( p_playlist, "intf-change", val );
}
-
+ vlc_object_release( p_playlist );
[o_info_window orderOut: self];
}
o_value = [o_item_value copy];
i_object_id = i_id;
o_parent = o_parent_item;
- p_item = [[[VLCMain sharedInstance] getInfo] getItem];
+ if( [[VLCMain sharedInstance] getInfo] != nil )
+ p_item = [[[VLCMain sharedInstance] getInfo] getItem];
+ else
+ p_item = NULL;
}
return( self );
}