[o_outline_view setDelegate: self];
[o_outline_view setDataSource: self];
[o_outline_view setAllowsEmptySelection: NO];
+ [o_outline_view expandItem: [o_outline_view itemAtRow:0]];
vlc_object_release( p_playlist );
[self initStrings];
o_tc_sortColumn = nil;
char ** ppsz_name;
- char ** ppsz_services = services_discovery_GetServicesNames( p_playlist, &ppsz_name );
+ char ** ppsz_services = vlc_sd_GetNames( &ppsz_name );
if( !ppsz_services )
{
vlc_object_release( p_playlist );
[o_mi_delete setTitle: _NS("Delete")];
[o_mi_recursive_expand setTitle: _NS("Expand Node")];
[o_mi_selectall setTitle: _NS("Select All")];
- [o_mi_info setTitle: _NS("Information...")];
+ [o_mi_info setTitle: _NS("Media Information...")];
+ [o_mi_dl_cover_art setTitle: _NS("Download Cover Art")];
[o_mi_preparse setTitle: _NS("Fetch Meta Data")];
[o_mi_revealInFinder setTitle: _NS("Reveal in Finder")];
[o_mm_mi_revealInFinder setTitle: _NS("Reveal in Finder")];
playlist_t *p_playlist = pl_Hold( VLCIntf );
+ PL_LOCK;
if( playlist_CurrentSize( p_playlist ) >= 2 )
{
[o_status_field setStringValue: [NSString stringWithFormat:
else
[o_status_field setStringValue: _NS("1 item")];
}
+ PL_UNLOCK;
vlc_object_release( p_playlist );
[self outlineViewSelectionDidChange: nil];
if( p_item )
{
- /* update our info-panel to reflect the new item */
- [[[VLCMain sharedInstance] getInfo] updatePanelWithItem:p_item->p_input];
-
/* update the state of our Reveal-in-Finder menu items */
NSMutableString *o_mrl;
char *psz_uri = input_item_GetURI( p_item->p_input );
{
if( p_item->i_children == -1 )
{
- playlist_PreparseEnqueue( p_playlist, p_item->p_input );
+ playlist_PreparseEnqueue( p_playlist, p_item->p_input, pl_Unlocked );
}
else
{
[self playlistUpdated];
}
+- (IBAction)downloadCoverArt:(id)sender
+{
+ int i_count;
+ NSMutableArray *o_to_preparse;
+ intf_thread_t * p_intf = VLCIntf;
+ playlist_t * p_playlist = pl_Hold( p_intf );
+
+ o_to_preparse = [NSMutableArray arrayWithArray:[[o_outline_view selectedRowEnumerator] allObjects]];
+ i_count = [o_to_preparse count];
+
+ int i, i_row;
+ NSNumber *o_number;
+ playlist_item_t *p_item = NULL;
+
+ for( i = 0; i < i_count; i++ )
+ {
+ o_number = [o_to_preparse lastObject];
+ i_row = [o_number intValue];
+ p_item = [[o_outline_view itemAtRow:i_row] pointerValue];
+ [o_to_preparse removeObject: o_number];
+ [o_outline_view deselectRow: i_row];
+
+ if( p_item && p_item->i_children == -1 )
+ {
+ playlist_AskForArtEnqueue( p_playlist, p_item->p_input, pl_Unlocked );
+ }
+ }
+ vlc_object_release( p_playlist );
+ [self playlistUpdated];
+}
+
- (IBAction)servicesChange:(id)sender
{
NSMenuItem *o_mi = (NSMenuItem *)sender;
return( o_ctx_menu );
}
-- (void)outlineView: (NSTableView*)o_tv
+- (void)outlineView: (NSOutlineView *)o_tv
didClickTableColumn:(NSTableColumn *)o_tc
{
- int i_mode = 0, i_type;
+ int i_mode, i_type = 0;
intf_thread_t *p_intf = VLCIntf;
playlist_t *p_playlist = pl_Hold( p_intf );
id o_value = [super outlineView: outlineView child: index ofItem: item];
playlist_t *p_playlist = pl_Hold( VLCIntf );
+ PL_LOCK;
if( playlist_CurrentSize( p_playlist ) >= 2 )
{
[o_status_field setStringValue: [NSString stringWithFormat:
[o_status_field setStringValue: _NS("1 item")];
}
}
+ PL_UNLOCK;
+
vlc_object_release( p_playlist );
[o_outline_dict setObject:o_value forKey:[NSString stringWithFormat:@"%p",