Commit 2103c812 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

macosx: Add a link to the playlistitem menu to retrieve Cover Art.

Forward port: [1a5a6b89692f2e6761b6ecd9ae9ee6e50b6e4138]
parent 4830a583
......@@ -490,17 +490,17 @@
</dict>
<dict>
<key>CLASS</key>
<string>ITSlider</string>
<string>NSObject</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSSlider</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSObject</string>
<string>ITSlider</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSSlider</string>
</dict>
<dict>
<key>ACTIONS</key>
......@@ -727,6 +727,8 @@
<string>id</string>
<key>deleteItem</key>
<string>id</string>
<key>downloadCoverArt</key>
<string>id</string>
<key>playItem</key>
<string>id</string>
<key>preparseItem</key>
......@@ -766,6 +768,8 @@
<string>id</string>
<key>o_mi_delete</key>
<string>id</string>
<key>o_mi_dl_cover_art</key>
<string>id</string>
<key>o_mi_info</key>
<string>id</string>
<key>o_mi_play</key>
......
......@@ -10,11 +10,11 @@
<integer>4</integer>
<key>IBOpenObjects</key>
<array>
<integer>3706</integer>
<integer>29</integer>
<integer>21</integer>
<integer>3706</integer>
<integer>3568</integer>
<integer>915</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>9F33</string>
......
......@@ -82,6 +82,7 @@
IBOutlet id o_mi_preparse;
IBOutlet id o_mi_revealInFinder;
IBOutlet id o_mm_mi_revealInFinder;
IBOutlet id o_mi_dl_cover_art;
IBOutlet id o_mi_selectall;
IBOutlet id o_mi_sort_name;
IBOutlet id o_mi_sort_author;
......@@ -131,6 +132,7 @@
- (IBAction)playItem:(id)sender;
- (IBAction)revealItemInFinder:(id)sender;
- (IBAction)preparseItem:(id)sender;
- (IBAction)downloadCoverArt:(id)sender;
- (IBAction)savePlaylist:(id)sender;
- (IBAction)deleteItem:(id)sender;
- (IBAction)selectAll:(id)sender;
......
......@@ -443,7 +443,8 @@
[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")];
......@@ -850,6 +851,37 @@
[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 );
}
}
vlc_object_release( p_playlist );
[self playlistUpdated];
}
- (IBAction)servicesChange:(id)sender
{
NSMenuItem *o_mi = (NSMenuItem *)sender;
......
......@@ -106,6 +106,7 @@
- (IBAction)metaFieldChanged:(id)sender;
- (IBAction)saveMetaData:(id)sender;
- (IBAction)downloadCoverArt:(id)sender;
- (void)initMediaPanelStats;
- (void)updatePanelWithItem:(input_item_t *)_p_item;
- (input_item_t *)item;
......
......@@ -425,6 +425,13 @@ error:
_NS("OK"), nil, nil);
}
- (IBAction)downloadCoverArt:(id)sender
{
playlist_t * p_playlist = pl_Hold( VLCIntf );
if( p_item) playlist_AskForArtEnqueue( p_playlist, p_item );
pl_Release( VLCIntf );
}
- (input_item_t *)item
{
if( p_item ) vlc_gc_incref( p_item );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment