Commit 1a5a6b89 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

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

This is based on code that is also used to force preparsing of the file, and
as such likely as working and broken as that.
parent b0438df5
...@@ -462,25 +462,25 @@ ...@@ -462,25 +462,25 @@
</dict> </dict>
<dict> <dict>
<key>CLASS</key> <key>CLASS</key>
<string>FirstResponder</string> <string>ITSlider</string>
<key>LANGUAGE</key> <key>LANGUAGE</key>
<string>ObjC</string> <string>ObjC</string>
<key>SUPERCLASS</key> <key>SUPERCLASS</key>
<string>NSObject</string> <string>NSSlider</string>
</dict> </dict>
<dict> <dict>
<key>CLASS</key> <key>CLASS</key>
<string>ITSlider</string> <string>NSObject</string>
<key>LANGUAGE</key> <key>LANGUAGE</key>
<string>ObjC</string> <string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSSlider</string>
</dict> </dict>
<dict> <dict>
<key>CLASS</key> <key>CLASS</key>
<string>NSObject</string> <string>FirstResponder</string>
<key>LANGUAGE</key> <key>LANGUAGE</key>
<string>ObjC</string> <string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict> </dict>
<dict> <dict>
<key>ACTIONS</key> <key>ACTIONS</key>
...@@ -703,6 +703,8 @@ ...@@ -703,6 +703,8 @@
<string>id</string> <string>id</string>
<key>deleteItem</key> <key>deleteItem</key>
<string>id</string> <string>id</string>
<key>downloadCoverArt</key>
<string>id</string>
<key>playItem</key> <key>playItem</key>
<string>id</string> <string>id</string>
<key>preparseItem</key> <key>preparseItem</key>
...@@ -740,6 +742,8 @@ ...@@ -740,6 +742,8 @@
<string>id</string> <string>id</string>
<key>o_mi_delete</key> <key>o_mi_delete</key>
<string>id</string> <string>id</string>
<key>o_mi_dl_cover_art</key>
<string>id</string>
<key>o_mi_info</key> <key>o_mi_info</key>
<string>id</string> <string>id</string>
<key>o_mi_play</key> <key>o_mi_play</key>
......
...@@ -10,13 +10,10 @@ ...@@ -10,13 +10,10 @@
<integer>4</integer> <integer>4</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>29</integer>
<integer>2416</integer>
<integer>915</integer>
<integer>1617</integer>
<integer>3568</integer> <integer>3568</integer>
<integer>24</integer>
<integer>915</integer>
<integer>21</integer> <integer>21</integer>
<integer>3706</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>9F33</string> <string>9F33</string>
......
{ <?xml version="1.0" encoding="UTF-8"?>
IBClasses = ( <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
{ <plist version="1.0">
CLASS = NSApplication; <dict>
LANGUAGE = ObjC; <key>IBClasses</key>
SUPERCLASS = NSResponder; <array>
}, <dict>
{ <key>CLASS</key>
CLASS = NSObject; <string>NSApplication</string>
LANGUAGE = ObjC; <key>LANGUAGE</key>
}, <string>ObjC</string>
{ <key>SUPERCLASS</key>
CLASS = NSTextField; <string>NSResponder</string>
LANGUAGE = ObjC; </dict>
SUPERCLASS = NSControl; <dict>
}, <key>CLASS</key>
{ <string>NSTextField</string>
ACTIONS = { <key>LANGUAGE</key>
createOutlineGroup = id; <string>ObjC</string>
deleteOutlineGroup = id; <key>SUPERCLASS</key>
metaFieldChanged = id; <string>NSControl</string>
saveMetaData = id; </dict>
}; <dict>
CLASS = VLCInfo; <key>CLASS</key>
LANGUAGE = ObjC; <string>NSObject</string>
OUTLETS = { <key>LANGUAGE</key>
"o_audio_box" = id; <string>ObjC</string>
"o_audio_decoded_lbl" = id; </dict>
"o_audio_decoded_txt" = id; <dict>
"o_author_lbl" = id; <key>ACTIONS</key>
"o_author_txt" = id; <dict>
"o_collection_lbl" = id; <key>createOutlineGroup</key>
"o_collection_txt" = id; <string>id</string>
"o_copyright_lbl" = id; <key>deleteOutlineGroup</key>
"o_copyright_txt" = id; <string>id</string>
"o_date_lbl" = id; <key>downloadCoverArt</key>
"o_date_txt" = id; <string>id</string>
"o_demux_bitrate_lbl" = id; <key>metaFieldChanged</key>
"o_demux_bitrate_txt" = id; <string>id</string>
"o_demux_bytes_lbl" = id; <key>saveMetaData</key>
"o_demux_bytes_txt" = id; <string>id</string>
"o_description_lbl" = id; </dict>
"o_description_txt" = id; <key>CLASS</key>
"o_displayed_lbl" = id; <string>VLCInfo</string>
"o_displayed_txt" = id; <key>LANGUAGE</key>
"o_fps_lbl" = id; <string>ObjC</string>
"o_fps_txt" = id; <key>OUTLETS</key>
"o_genre_lbl" = id; <dict>
"o_genre_txt" = id; <key>o_audio_box</key>
"o_image_well" = id; <string>id</string>
"o_info_window" = id; <key>o_audio_decoded_lbl</key>
"o_input_bitrate_lbl" = id; <string>id</string>
"o_input_bitrate_txt" = id; <key>o_audio_decoded_txt</key>
"o_input_box" = id; <string>id</string>
"o_language_lbl" = id; <key>o_author_lbl</key>
"o_language_txt" = id; <string>id</string>
"o_lost_abuffers_lbl" = id; <key>o_author_txt</key>
"o_lost_abuffers_txt" = id; <string>id</string>
"o_lost_frames_lbl" = id; <key>o_collection_lbl</key>
"o_lost_frames_txt" = id; <string>id</string>
"o_nowPlaying_lbl" = id; <key>o_collection_txt</key>
"o_nowPlaying_txt" = id; <string>id</string>
"o_outline_view" = id; <key>o_copyright_lbl</key>
"o_played_abuffers_lbl" = id; <string>id</string>
"o_played_abuffers_txt" = id; <key>o_copyright_txt</key>
"o_publisher_lbl" = id; <string>id</string>
"o_publisher_txt" = id; <key>o_date_lbl</key>
"o_read_bytes_lbl" = id; <string>id</string>
"o_read_bytes_txt" = id; <key>o_date_txt</key>
"o_saveMetaData_btn" = id; <string>id</string>
"o_sent_bitrate_lbl" = id; <key>o_demux_bitrate_lbl</key>
"o_sent_bitrate_txt" = id; <string>id</string>
"o_sent_bytes_lbl" = id; <key>o_demux_bitrate_txt</key>
"o_sent_bytes_txt" = id; <string>id</string>
"o_sent_packets_lbl" = id; <key>o_demux_bytes_lbl</key>
"o_sent_packets_txt" = id; <string>id</string>
"o_seqNum_lbl" = id; <key>o_demux_bytes_txt</key>
"o_seqNum_txt" = id; <string>id</string>
"o_sout_box" = id; <key>o_description_lbl</key>
"o_tab_view" = id; <string>id</string>
"o_title_lbl" = id; <key>o_description_txt</key>
"o_title_txt" = id; <string>id</string>
"o_uri_lbl" = id; <key>o_displayed_lbl</key>
"o_uri_txt" = id; <string>id</string>
"o_video_box" = id; <key>o_displayed_txt</key>
"o_video_decoded_lbl" = id; <string>id</string>
"o_video_decoded_txt" = id; <key>o_fps_lbl</key>
}; <string>id</string>
SUPERCLASS = NSObject; <key>o_fps_txt</key>
} <string>id</string>
); <key>o_genre_lbl</key>
IBVersion = 1; <string>id</string>
} <key>o_genre_txt</key>
\ No newline at end of file <string>id</string>
<key>o_image_well</key>
<string>id</string>
<key>o_info_window</key>
<string>id</string>
<key>o_input_bitrate_lbl</key>
<string>id</string>
<key>o_input_bitrate_txt</key>
<string>id</string>
<key>o_input_box</key>
<string>id</string>
<key>o_language_lbl</key>
<string>id</string>
<key>o_language_txt</key>
<string>id</string>
<key>o_lost_abuffers_lbl</key>
<string>id</string>
<key>o_lost_abuffers_txt</key>
<string>id</string>
<key>o_lost_frames_lbl</key>
<string>id</string>
<key>o_lost_frames_txt</key>
<string>id</string>
<key>o_nowPlaying_lbl</key>
<string>id</string>
<key>o_nowPlaying_txt</key>
<string>id</string>
<key>o_outline_view</key>
<string>id</string>
<key>o_played_abuffers_lbl</key>
<string>id</string>
<key>o_played_abuffers_txt</key>
<string>id</string>
<key>o_publisher_lbl</key>
<string>id</string>
<key>o_publisher_txt</key>
<string>id</string>
<key>o_read_bytes_lbl</key>
<string>id</string>
<key>o_read_bytes_txt</key>
<string>id</string>
<key>o_saveMetaData_btn</key>
<string>id</string>
<key>o_sent_bitrate_lbl</key>
<string>id</string>
<key>o_sent_bitrate_txt</key>
<string>id</string>
<key>o_sent_bytes_lbl</key>
<string>id</string>
<key>o_sent_bytes_txt</key>
<string>id</string>
<key>o_sent_packets_lbl</key>
<string>id</string>
<key>o_sent_packets_txt</key>
<string>id</string>
<key>o_seqNum_lbl</key>
<string>id</string>
<key>o_seqNum_txt</key>
<string>id</string>
<key>o_sout_box</key>
<string>id</string>
<key>o_tab_view</key>
<string>id</string>
<key>o_title_lbl</key>
<string>id</string>
<key>o_title_txt</key>
<string>id</string>
<key>o_uri_lbl</key>
<string>id</string>
<key>o_uri_txt</key>
<string>id</string>
<key>o_video_box</key>
<string>id</string>
<key>o_video_decoded_lbl</key>
<string>id</string>
<key>o_video_decoded_txt</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
...@@ -2,20 +2,16 @@ ...@@ -2,20 +2,16 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key>
<string>69 68 356 240 0 0 1280 778 </string>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>489.0</string> <string>649</string>
<key>IBLastKnownRelativeProjectPath</key> <key>IBLastKnownRelativeProjectPath</key>
<string>../../vlc.xcodeproj</string> <string>../../vlc.xcodeproj</string>
<key>IBOldestOS</key> <key>IBOldestOS</key>
<integer>5</integer> <integer>5</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array/>
<integer>2</integer>
</array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>9E17</string> <string>9F33</string>
<key>targetFramework</key> <key>targetFramework</key>
<string>IBCocoaFramework</string> <string>IBCocoaFramework</string>
</dict> </dict>
......
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
IBOutlet id o_mi_delete; IBOutlet id o_mi_delete;
IBOutlet id o_mi_info; IBOutlet id o_mi_info;
IBOutlet id o_mi_preparse; IBOutlet id o_mi_preparse;
IBOutlet id o_mi_dl_cover_art;
IBOutlet id o_mi_selectall; IBOutlet id o_mi_selectall;
IBOutlet id o_mi_sort_name; IBOutlet id o_mi_sort_name;
IBOutlet id o_mi_sort_author; IBOutlet id o_mi_sort_author;
...@@ -128,6 +129,7 @@ ...@@ -128,6 +129,7 @@
- (IBAction)servicesChange:(id)sender; - (IBAction)servicesChange:(id)sender;
- (IBAction)playItem:(id)sender; - (IBAction)playItem:(id)sender;
- (IBAction)preparseItem:(id)sender; - (IBAction)preparseItem:(id)sender;
- (IBAction)downloadCoverArt:(id)sender;
- (IBAction)savePlaylist:(id)sender; - (IBAction)savePlaylist:(id)sender;
- (IBAction)deleteItem:(id)sender; - (IBAction)deleteItem:(id)sender;
- (IBAction)selectAll:(id)sender; - (IBAction)selectAll:(id)sender;
......
...@@ -443,7 +443,8 @@ ...@@ -443,7 +443,8 @@
[o_mi_delete setTitle: _NS("Delete")]; [o_mi_delete setTitle: _NS("Delete")];
[o_mi_recursive_expand setTitle: _NS("Expand Node")]; [o_mi_recursive_expand setTitle: _NS("Expand Node")];
[o_mi_selectall setTitle: _NS("Select All")]; [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_preparse setTitle: _NS("Fetch Meta Data")];
[o_mi_sort_name setTitle: _NS("Sort Node by Name")]; [o_mi_sort_name setTitle: _NS("Sort Node by Name")];
[o_mi_sort_author setTitle: _NS("Sort Node by Author")]; [o_mi_sort_author setTitle: _NS("Sort Node by Author")];
...@@ -805,6 +806,37 @@ ...@@ -805,6 +806,37 @@
[self playlistUpdated]; [self playlistUpdated];
} }
- (IBAction)downloadCoverArt:(id)sender
{
int i_count;
NSMutableArray *o_to_preparse;
intf_thread_t * p_intf = VLCIntf;
playlist_t * p_playlist = pl_Yield( 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 - (IBAction)servicesChange:(id)sender
{ {
NSMenuItem *o_mi = (NSMenuItem *)sender; NSMenuItem *o_mi = (NSMenuItem *)sender;
......
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
- (IBAction)metaFieldChanged:(id)sender; - (IBAction)metaFieldChanged:(id)sender;
- (IBAction)saveMetaData:(id)sender; - (IBAction)saveMetaData:(id)sender;
- (IBAction)downloadCoverArt:(id)sender;
- (void)initMediaPanelStats; - (void)initMediaPanelStats;
- (void)updatePanelWithItem:(input_item_t *)_p_item; - (void)updatePanelWithItem:(input_item_t *)_p_item;
- (input_item_t *)item; - (input_item_t *)item;
......
...@@ -425,6 +425,13 @@ error: ...@@ -425,6 +425,13 @@ error:
_NS("OK"), nil, nil); _NS("OK"), nil, nil);
} }
- (IBAction)downloadCoverArt:(id)sender
{
playlist_t * p_playlist = pl_Yield( VLCIntf );
if( p_item) playlist_AskForArtEnqueue( p_playlist, p_item );
pl_Release( VLCIntf );
}
- (input_item_t *)item - (input_item_t *)item
{ {
if( p_item ) vlc_gc_incref( p_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